mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
qemuMigrationSrcNBDStorageCopyReady: Use ready-state of mirror from qemuBlockJobData
Use the per-job state to determine when the non-shared-storage mirror is complete rather than the per-disk definition one. The qemuBlockJobData is a newer approach and is always cleared after the blockjob is terminated while the 'mirrorState' variable in the definition of the disk may be left over. In such case the disk mirror would be considered complete prematurely. https://bugzilla.redhat.com/show_bug.cgi?id=1889131 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d855f12945
commit
a09c421e3e
@ -591,10 +591,10 @@ qemuMigrationSrcNBDStorageCopyReady(virDomainObjPtr vm,
|
||||
return -1;
|
||||
}
|
||||
|
||||
virObjectUnref(job);
|
||||
|
||||
if (disk->mirrorState != VIR_DOMAIN_DISK_MIRROR_STATE_READY)
|
||||
if (job->state != VIR_DOMAIN_BLOCK_JOB_READY)
|
||||
notReady++;
|
||||
|
||||
virObjectUnref(job);
|
||||
}
|
||||
|
||||
if (notReady) {
|
||||
|
Loading…
Reference in New Issue
Block a user