qemu: Un-mark volume as mirrored/copied if blockjob copy fails

When the blockjob fails for some reason an event is emitted but the disk
wasn't unmarked as being part of a active block copy operation.
This commit is contained in:
Peter Krempa 2013-03-20 16:48:23 +01:00
parent 6e5ad18992
commit a584eaa5ff

View File

@ -965,6 +965,9 @@ qemuProcessHandleBlockJob(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
if (disk->mirror && type == VIR_DOMAIN_BLOCK_JOB_TYPE_COPY &&
status == VIR_DOMAIN_BLOCK_JOB_READY)
disk->mirroring = true;
if (disk->mirror && type == VIR_DOMAIN_BLOCK_JOB_TYPE_COPY &&
status == VIR_DOMAIN_BLOCK_JOB_FAILED)
VIR_FREE(disk->mirror);
}
virObjectUnlock(vm);