]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: blockjob: Reset 'synchronous' block job handling flag prior to flushing events
authorPeter Krempa <pkrempa@redhat.com>
Mon, 22 Jul 2019 16:15:38 +0000 (18:15 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 25 Jul 2019 11:21:33 +0000 (13:21 +0200)
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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_blockjob.c

index 575292ada2eb6011dc4c317e81fb8d2e97104a2b..da4f20929be28a244abe31c5bc7fdfbeb2d85534 100644 (file)
@@ -821,8 +821,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);
 }