mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemuBlockJobEventProcess: Always clear 'mirrorState' when a job finishes
When a block job is terminated we should clear the 'mirrorState' and 'mirrorJob' variables so that stale values are not present prior to a new job. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a09c421e3e
commit
202d61db48
@ -1691,6 +1691,10 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver,
|
||||
case QEMU_BLOCKJOB_STATE_FAILED:
|
||||
case QEMU_BLOCKJOB_STATE_CANCELLED:
|
||||
case QEMU_BLOCKJOB_STATE_CONCLUDED:
|
||||
if (job->disk) {
|
||||
job->disk->mirrorState = VIR_DOMAIN_DISK_MIRROR_STATE_NONE;
|
||||
job->disk->mirrorJob = VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN;
|
||||
}
|
||||
qemuBlockJobEventProcessConcluded(job, driver, vm, asyncJob);
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user