[libvirt] [PATCH 00/10] qemu: Refactor disk hotplug code for better reuse with blockdev (blockdev-add saga)

Peter Krempa posted 10 patches 4 years, 10 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1561390513.git.pkrempa@redhat.com
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(-)
[libvirt] [PATCH 00/10] qemu: Refactor disk hotplug code for better reuse with blockdev (blockdev-add saga)
Posted by Peter Krempa 4 years, 10 months ago
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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list