History | View | Annotate | Download (16.1 kB)
scsi-disk: Implement rerror option
This implements the rerror option for SCSI disks.
It also includes minor changes to the write path where the same code is usedthat was criticized in the review for the changes to the read path required forrerror support....
QemuOpts: make most qemu_*_opts static
Switch tree to lookup-by-name using qemu_find_opts().Also hook up virtfs options so qemu_find_opts works for them too.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix -snapshot deleting images on disk change
Block device change command did not copy BDRV_O_SNAPSHOT flag. Thusthe new image did not have this flag and the file got deleted duringopening.
Fix by copying BDRV_O_SNAPSHOT flag.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>...
blockdev: Clean up how readonly persists across virtual media change
Since commit cb4e5f8e, monitor command change makes the new mediareadonly iff the type hint is BDRV_TYPE_CDROM, i.e. the drive wascreated with media=cdrom. The intention is to avoid changing a block...
Merge remote branch 'kwolf/for-anthony' into staging
blockdev: drive_get_by_id() is no longer used, remove
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockdev: Remove drive_get_serial()
Unused since commit 6ced55a5.
blockdev: New drive_get_by_blockdev()
blockdev: Clean up automatic drive deletion
We automatically delete blockdev host parts on unplug of the guestdevice. Too much magic, but we can't change that now.
The delete happens early in the guest device teardown, before theconnection to the host part is severed. Thus, the guest part's...
Monitor: handle optional '-' arg as a bool
Historically, user monitor arguments beginning with '-' (eg. '-f')were passed as integers down to handlers.
I've maintained this behavior in the new monitor because we didn'thave a boolean type at the very beginning of QMP. Today we have it...
monitor: allow device to be ejected if no disk is inserted
This changes the monitor eject_device() function to not check forbdrv_is_inserted().
Example run where the bug manifests itself:
(output of 'info block' is stripped to include only the CD-ROM device)...
block: Move error actions from DriveInfo to BlockDriverState
That's where they belong semantically (block device host part), eventhough the actions are actually executed by guest device code.
block: Decouple block device "commit all" from DriveInfo
do_commit() and mux_proc_byte() iterate over the list of drivesdefined with drive_init(). This misses host block devices defined byother means. Such means don't exist now, but will be introduced later...
monitor: Make "commit FOO" complain when FOO doesn't exist
blockdev: Give drives internal linkage
This is the list of drives defined with drive_init(). Hide it, so itdoesn't get abused.
Fix regression for "-drive file="
Empty file used to create an empty drive (no media). Since commit9dfd7c7a, it's an error: "qemu: could not open disk image : No suchfile or directory". Older versions of libvirt can choke on this.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
block: Fix serial number assignment
We should use 'dinfo->serial' length, 'serial' is a pointer, sothe serial number length is currently limited to the pointer size.
This fixes https://bugs.launchpad.net/qemu/+bug/584143 and is alsovalid for stable.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
blockdev: Collect block device code in new blockdev.c
Anything that moves hundreds of lines out of vl.c can't be all bad.