qemu: blockjob: Reset 'synchronous' block job handling flag prior to flushing events

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>
This commit is contained in:
Peter Krempa 2019-07-22 18:15:38 +02:00
parent 22a9f08572
commit 93b77cba0a

View 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);
}