[libvirt] [PATCH 15/21] qemu_hotplug: pull qemuDomainUpdateDeviceList out of qemuDomainDetachDeviceLive
Laine Stump
laine at laine.org
Fri Mar 22 13:41:36 UTC 2019
On 3/22/19 7:41 AM, Peter Krempa wrote:
> On Thu, Mar 21, 2019 at 18:28:55 -0400, Laine Stump wrote:
>> qemuDomainDetachDeviceLive() is called from two places in
>> qemu_driver.c. Move the call to qemuDomainUpdateDeviceList() from the
>> end of that function, which is now in qemu_hotplug.c, to the two
>> places that call qemuDomainDetachDeviceLive().
>>
>> Removing that one call from qemuDomainDetachDeviceList() will permit
>> us to call it from the test driver, replacing the separate calls to
>> qemuDomainDetachDeviceDiskLive(), qemuDomainDetachChrDevice(),
>> qemuDomainDetachShmemDevice() and qemuDomainDetachWatchdog(). We want
>> to do this so that part of the common functionality of those three
>> functions (and the rest of the device-specific Detach functions) can
>> be pulled up into qemuDomainDetachDeviceLive() without breaking the
>> test. (This is done in the next patch).
> I think actually that calling qemuDomainUpdateDeviceList does not make
> much sense in qemuDomainDetachDeviceLive. At that point the device still
> may not be removed. Calling it from the DEVICE_DELETED handler should be
> sufficient.
I trust your word on that, but I was trying to maintain the same
functionality, and we previously were calling it. I can add a later
patch to remove it completely if you like
(In the meantime, I'm getting really tired of all these function names
that are almost completely identical. I don't know how many times I
typed qemuDomainDetachDeviceLive when I meant to type
qemuDomainDetachDeviceList :-/)
More information about the libvir-list
mailing list