
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@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