[libvirt] [PATCH 0/6] qemu: hotplug: Kill duplicated code in disk hotplug (blockdev-add saga)

Peter Krempa posted 6 patches 6 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1508418883.git.pkrempa@redhat.com
src/conf/domain_addr.c         |   3 +-
src/conf/domain_addr.h         |   4 +-
src/qemu/qemu_domain_address.c |   7 +-
src/qemu/qemu_hotplug.c        | 273 ++++++++---------------------------------
4 files changed, 53 insertions(+), 234 deletions(-)
[libvirt] [PATCH 0/6] qemu: hotplug: Kill duplicated code in disk hotplug (blockdev-add saga)
Posted by Peter Krempa 6 years, 5 months ago
A lot of code was copypasted into the three disk attaching functions
which are (almost) identical (one was forgotten), without refactoring it
first. Let's reduce two copies of the ugly code. BTW this adds support
for disk encryption and storage source authentication for USB disks.

Peter Krempa (6):
  qemu: address: Remove dead code when un-reserving PCI address
  qemu: hotplug: Remove wrong check for empty disks
  qemu: hotplug: Use disk target in debug/warning messages where
    appropriate
  qemu: hotplug: extract disk hotplug worker code
  qemu: hotplug: Reuse qemuDomainAttachDiskGeneric in
    qemuDomainAttachSCSIDisk
  qemu: hotplug: Reuse qemuDomainAttachDiskGeneric in
    qemuDomainAttachUSBMassStorageDevice

 src/conf/domain_addr.c         |   3 +-
 src/conf/domain_addr.h         |   4 +-
 src/qemu/qemu_domain_address.c |   7 +-
 src/qemu/qemu_hotplug.c        | 273 ++++++++---------------------------------
 4 files changed, 53 insertions(+), 234 deletions(-)

-- 
2.14.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/6] qemu: hotplug: Kill duplicated code in disk hotplug (blockdev-add saga)
Posted by Ján Tomko 6 years, 5 months ago
On Thu, Oct 19, 2017 at 03:16:32PM +0200, Peter Krempa wrote:
>A lot of code was copypasted into the three disk attaching functions
>which are (almost) identical (one was forgotten), without refactoring it
>first. Let's reduce two copies of the ugly code. BTW this adds support
>for disk encryption and storage source authentication for USB disks.
>
>Peter Krempa (6):
>  qemu: address: Remove dead code when un-reserving PCI address
>  qemu: hotplug: Remove wrong check for empty disks
>  qemu: hotplug: Use disk target in debug/warning messages where
>    appropriate
>  qemu: hotplug: extract disk hotplug worker code
>  qemu: hotplug: Reuse qemuDomainAttachDiskGeneric in
>    qemuDomainAttachSCSIDisk
>  qemu: hotplug: Reuse qemuDomainAttachDiskGeneric in
>    qemuDomainAttachUSBMassStorageDevice
>
> src/conf/domain_addr.c         |   3 +-
> src/conf/domain_addr.h         |   4 +-
> src/qemu/qemu_domain_address.c |   7 +-
> src/qemu/qemu_hotplug.c        | 273 ++++++++---------------------------------
> 4 files changed, 53 insertions(+), 234 deletions(-)

ACK series

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