Move around few of the helpers which deal with disk addition and
removal and fix a potential bug in the blockdev media change routine.
The refactors will allow simplify a corner case of using blockdev such
as if the disk frontend is unplugged the backends can be unplugged only
after blockjobs terminate.
This will allow simpler handling of the backing chain data in
conjunction with blockjobs.
To test the blockdev part you can use the new XML namespace element for
qemu:
<domain type='kvm'
xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
[...]
<qemu:capabilities>
<qemu:add capability='blockdev'/>
</qemu:capabilities>
if you have a recent enough qemu.
Peter Krempa (10):
qemu: block: Move and rename qemuHotplugRemoveStorageSourcePrepareData
qemu: hotplug: Handle copy-on-read filter separate from rest of
backing chain
qemu: Introduce new set of helpers for attaching and detaching storage
chains
qemu: command: Use storage chain helpers in commandline generator
qemu: command: Use VIR_AUTO infrastructure in
qemuBuildDiskSourceCommandLine
qemu: command: get rid of 'cleanup' in qemuBuildDiskSourceCommandLine
qemu: hotplug: Use storage chain helpers in
qemuDomainAttachDiskGeneric
qemu: hotplug: Use storage chain helpers in qemuDomainRemoveDiskDevice
qemu: hotplug: qemu: hotplug: Use storage chain helpers in
qemuDomainChangeMediaBlockdev
qemu: hotplug: Remove rest of source backend if hotplug fails
src/qemu/qemu_block.c | 174 +++++++++++++++++++++
src/qemu/qemu_block.h | 33 ++++
src/qemu/qemu_command.c | 132 ++++++++++------
src/qemu/qemu_command.h | 11 ++
src/qemu/qemu_hotplug.c | 332 +++++++---------------------------------
5 files changed, 361 insertions(+), 321 deletions(-)
--
2.21.0