From 5b29c7dc276da9d36eae4361d20d3095db262baa Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 26 Nov 2019 14:16:37 +0100 Subject: [PATCH] qemu: blockjob: Mark job with broken data but tracked by qemu as reconnected Otherwise it would get dropped later on as untracked despite us knowing about it. Additionally since we cancelled it we must wait to dismiss it which would not be possible if we unregister it. This also opened a window for a race condition since the job state change event of the just-cancelled job might be delivered prior to us unregistering the job in which case everything would work properly. Signed-off-by: Peter Krempa Reviewed-by: Cole Robinson --- src/qemu/qemu_blockjob.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index b83d681f06..4d14c3d27c 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -465,6 +465,8 @@ qemuBlockJobRefreshJobs(virQEMUDriverPtr driver, if (rc < 0) qemuBlockJobUnregister(job, vm); + else + job->reconnected = true; continue; }