[libvirt] [PATCH 1/2] qemu: Finish device removal in the original thread

Peter Krempa pkrempa at redhat.com
Mon Jun 2 09:57:54 UTC 2014


On 05/26/14 17:30, Jiri Denemark wrote:
> If QEMU supports DEVICE_DELETED event, we always call
> qemuDomainRemoveDevice from the event handler. However, we will need to
> push this call away from the main event loop and begin a job for it (see
> the following commit), we need to make sure the device if fully removed
> by the original thread (and within its existing job) in case the
> DEVICE_DELETED event arrives before qemuDomainWaitForDeviceRemoval times
> out.
> 
> Without this patch, device removals would be guaranteed to never finish
> before the timeout because the could would be blocked by the original
> job being still active.
> 
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
>  src/qemu/qemu_hotplug.c | 44 +++++++++++++++++++++++++++++++++-----------
>  src/qemu/qemu_hotplug.h |  2 +-
>  src/qemu/qemu_process.c |  3 ++-
>  3 files changed, 36 insertions(+), 13 deletions(-)
> 

ACK,

Peter


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140602/4188eb6b/attachment-0001.sig>


More information about the libvir-list mailing list