[libvirt] [PATCH 7/7] qemu: blockjob: Reset 'synchronous' block job handling flag prior to flushing events

Peter Krempa pkrempa at redhat.com
Tue Jul 23 12:08:51 UTC 2019


When returning to asynchronous block job handling the flag which
determines the handling method should be reset prior to flushing
outstanding events. If there's an event to process the handler may
invoke the monitor and another event may be received. We'd not process
that one. Reset the flag earlier.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/qemu/qemu_blockjob.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index 292610d089..dfa55a0e7a 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -808,8 +808,8 @@ qemuBlockJobSyncEnd(virDomainObjPtr vm,
         diskdst = job->disk->dst;

     VIR_DEBUG("disk=%s", NULLSTR(diskdst));
-    qemuBlockJobUpdate(vm, job, asyncJob);
     job->synchronous = false;
+    qemuBlockJobUpdate(vm, job, asyncJob);
 }


-- 
2.21.0




More information about the libvir-list mailing list