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 <pkrempa@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Peter Krempa 2019-11-26 14:16:37 +01:00
parent f15d4cb1c8
commit 5b29c7dc27

View File

@ -465,6 +465,8 @@ qemuBlockJobRefreshJobs(virQEMUDriverPtr driver,
if (rc < 0)
qemuBlockJobUnregister(job, vm);
else
job->reconnected = true;
continue;
}