]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: blockjob: Mark job with broken data but tracked by qemu as reconnected
authorPeter Krempa <pkrempa@redhat.com>
Tue, 26 Nov 2019 13:16:37 +0000 (14:16 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 27 Nov 2019 14:59:33 +0000 (15:59 +0100)
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 <pkrempa@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
src/qemu/qemu_blockjob.c

index b83d681f0664e150c222941803254f77d763710d..4d14c3d27c025c94860135cc9c71ac59c81dd143 100644 (file)
@@ -465,6 +465,8 @@ qemuBlockJobRefreshJobs(virQEMUDriverPtr driver,
 
             if (rc < 0)
                 qemuBlockJobUnregister(job, vm);
+            else
+                job->reconnected = true;
             continue;
         }