[libvirt] [PATCH v3 0/3] Alter qemu live/cold device attach algorithm

John Ferlan posted 3 patches 5 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180716211424.15582-1-jferlan@redhat.com
Test syntax-check passed
src/conf/domain_conf.c | 54 +++++++++++++++++++++++++++++++++++---
src/conf/domain_conf.h |  3 ++-
src/qemu/qemu_driver.c | 59 ++++++++++++++++--------------------------
3 files changed, 75 insertions(+), 41 deletions(-)
[libvirt] [PATCH v3 0/3] Alter qemu live/cold device attach algorithm
Posted by John Ferlan 5 years, 9 months ago
v2: https://www.redhat.com/archives/libvir-list/2018-July/msg00361.html

Differences to v2:

Patch1: NEW - As a result of code review the suggestion was to utilize
        the virDomainDefCompatibleDevice in order to make the check more
        generic to include <disk>'s which were also afflicted with the
        same problem that I was trying to solve with the former patch1
        just for <hostdev>'s. However, this led me down into the abyss of
        more changes since <disk>'s have multiple <address type='drive'...>
        target bus types (IDE and SCSI). That means we need to have a
        mechanism to pass the target bus along so that a SCSI drive
        address doesn't inadvertently match an IDE drive address. All
        that is complicated by the way virDomainDefHasDeviceAddress
        iterates through all the device lists.  Whether there are more
        similar devices I'm assuming will fall out of code review.

Patch2: This moves the virDomainDefHasDeviceAddress into the more
        common config checking virDomainDefCompatibleDevice method,
        but now needs to also account for the disk bus issue.

        This theoretically could be combined with Patch1, but keeping
        them separate I would hope makes for simpler code review. I
        could also move code out of virDomainDefHasDeviceAddressIterator
        into patch2, but if just felt better in patch1.

Patch3: No changes were made (amazingly so).

In the end quite a bit more complicated

John Ferlan (3):
  conf: Add @target_bus to virDomainDefHasDeviceAddress
  qemu: Check for existing address when cold attach device
  qemu: Use the correct vm def on cold attach

 src/conf/domain_conf.c | 54 +++++++++++++++++++++++++++++++++++---
 src/conf/domain_conf.h |  3 ++-
 src/qemu/qemu_driver.c | 59 ++++++++++++++++--------------------------
 3 files changed, 75 insertions(+), 41 deletions(-)

-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 0/3] Alter qemu live/cold device attach algorithm
Posted by John Ferlan 5 years, 8 months ago
ping.

Tks,

John

On 07/16/2018 05:14 PM, John Ferlan wrote:
> v2: https://www.redhat.com/archives/libvir-list/2018-July/msg00361.html
> 
> Differences to v2:
> 
> Patch1: NEW - As a result of code review the suggestion was to utilize
>         the virDomainDefCompatibleDevice in order to make the check more
>         generic to include <disk>'s which were also afflicted with the
>         same problem that I was trying to solve with the former patch1
>         just for <hostdev>'s. However, this led me down into the abyss of
>         more changes since <disk>'s have multiple <address type='drive'...>
>         target bus types (IDE and SCSI). That means we need to have a
>         mechanism to pass the target bus along so that a SCSI drive
>         address doesn't inadvertently match an IDE drive address. All
>         that is complicated by the way virDomainDefHasDeviceAddress
>         iterates through all the device lists.  Whether there are more
>         similar devices I'm assuming will fall out of code review.
> 
> Patch2: This moves the virDomainDefHasDeviceAddress into the more
>         common config checking virDomainDefCompatibleDevice method,
>         but now needs to also account for the disk bus issue.
> 
>         This theoretically could be combined with Patch1, but keeping
>         them separate I would hope makes for simpler code review. I
>         could also move code out of virDomainDefHasDeviceAddressIterator
>         into patch2, but if just felt better in patch1.
> 
> Patch3: No changes were made (amazingly so).
> 
> In the end quite a bit more complicated
> 
> John Ferlan (3):
>   conf: Add @target_bus to virDomainDefHasDeviceAddress
>   qemu: Check for existing address when cold attach device
>   qemu: Use the correct vm def on cold attach
> 
>  src/conf/domain_conf.c | 54 +++++++++++++++++++++++++++++++++++---
>  src/conf/domain_conf.h |  3 ++-
>  src/qemu/qemu_driver.c | 59 ++++++++++++++++--------------------------
>  3 files changed, 75 insertions(+), 41 deletions(-)
> 

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