History | View | Annotate | Download (1.9 kB)
qapi: Convert eject
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: Convert change
qapi: Convert block_set_io_throttle
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: Convert block_passwd
qapi: Convert block_resize
qapi: Convert blockdev_snapshot_sync
Unfortunately, this conversion required an additional change.
In the old QMP command, the 'snapshot-file' argument is specified asoptional. The idea is to take the snapshot internally if 'snapshot-file'is not passed. However, internal snapshots are not supported yet so...
hmp/qmp: add block_set_io_throttle
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockdev: Store -drive option media in DriveInfo
DriveInfo is closely tied to -drive, and like -drive, it mixesinformation about host and guest part of the block device. UnlikeDriveInfo, BlockDriverState should be about the host part only.
One of the remaining guest bits there is the "type hint". -drive...
blockdev: add refcount to DriveInfo
The host part of a block device can be deleted with in progressblock migration.
To fix this, add a reference count to DriveInfo, freeing resourceson last reference.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>...
blockdev: Fix drive_add for drives without media
Watch this:
(qemu) drive_add 0 if=none (qemu) info block none0: type=hd removable=0 [not inserted] (qemu) drive_del none0 Segmentation fault (core dumped)
add_init_drive() is confused about drive_init()'s failure modes, and...
blockdev: Replace drive_add()'s fmt, ... by optstr parameter
Let the callers build the optstr. Only one wants to. All the othersbecome simpler, because they don't have to worry about escaping '%'.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockdev: New drive_get_by_index()
blockdev: Make drive_add() take explicit type, index parameters
Before, type & index were hidden in printf-like fmt, ... parameters,which get expanded into an option string. Rather inconvenient foruses later in this series.
New IF_DEFAULT to ask for the machine's default interface. Before,...
blockdev: Fix regression in -drive if=scsi,index=N
Before commit 622b520f, index=12 meant bus=1,unit=5.
Since the commit, it means bus=0,unit=12. The drive is created, butnot the guest device. That's because the controllers we use withif=scsi drives (lsi53c895a and esp) support only 7 units, and...
blockdev: Move BlockInterfaceType from qemu-common.h to blockdev.h
blockdev: New drive_get_next(), replacing qdev_init_bdrv()
qdev_init_bdrv() doesn't belong into qdev.c; it's about drives, notqdevs. Rename to drive_get_next, move to blockdev.c, drop the bogusDeviceState argument, and return DriveInfo instead ofBlockDriverState....
block: add block_resize monitor command
Add a monitor command that allows resizing of block devices whileqemu is running. It uses the existing bdrv_truncate method alreadyused by qemu-img to do it's work. Compared to qemu-img the sizeparsing is very simplicistic, but I think having a properly numering...
Introduce do_snapshot_blkdev() and monitor command to handle it.
The monitor command is:snapshot_blkdev <device> [snapshot-file] [format]
Default format is qcow2. For now snapshots without a snapshot-file, eginternal snapshots, are not supported.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>...
scsi: Increase the number of possible devices
The SCSI parallel interface has a limit of 8 devices, butnot the SCSI stack in general. So we should be removing thehard-coded limit and use MAX_SCSI_DEVS instead.And we only need to scan those devices which are allocated...
Implement drive_del to decouple block removal from device removal
Currently device hotplug removal code is tied to device removal viaACPI. All pci devices that are removable via device_del() require theguest to respond to the request. In some cases the guest may not...
blockdev: Use GCC_FMT_ATTR (format checking)
Additional changes:
Cc: Blue Swirl <blauwirbel@gmail.com>...
Rearrange block headers
Changing block.h or blockdev.h resulted in recompiling most objects.
Move DriveInfo typedef and BlockInterfaceType enum definitionsto qemu-common.h and rearrange blockdev.h use to decrease churn.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
blockdev: drive_get_by_id() is no longer used, remove
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...
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.
blockdev: Give drives internal linkage
This is the list of drives defined with drive_init(). Hide it, so itdoesn't get abused.
blockdev: Collect block device code in new blockdev.c
Anything that moves hundreds of lines out of vl.c can't be all bad.