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

Peter Krempa posted 7 patches 6 years, 6 months ago
[libvirt] [PATCH 7/7] qemu: blockjob: Reset 'synchronous' block job handling flag prior to flushing events
Posted by Peter Krempa 6 years, 6 months ago
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>
---
 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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 7/7] qemu: blockjob: Reset 'synchronous' block job handling flag prior to flushing events
Posted by Ján Tomko 6 years, 6 months ago
On Tue, Jul 23, 2019 at 02:08:51PM +0200, Peter Krempa wrote:
>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>
>---
> src/qemu/qemu_blockjob.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list