From: Peter Krempa Date: Wed, 20 Mar 2013 15:48:23 +0000 (+0100) Subject: qemu: Un-mark volume as mirrored/copied if blockjob copy fails X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a584eaa5ff878608d55e5218fb43d066c02dff6b;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git 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. --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 14aa8922e..8c4bfb76d 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -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);