]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Clear block copy mirror state explicitly
authorPeter Krempa <pkrempa@redhat.com>
Thu, 24 Jan 2019 09:49:34 +0000 (10:49 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 29 Jan 2019 12:41:16 +0000 (13:41 +0100)
While this should not be necessary as we clear it in the event handler,
let's be sure and clear it prior to starting the job.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_driver.c

index 5387150bbd214a97617ef7d1831e326e8f1234c4..af89f6de3b59f88c42a8a3abeb70645578bf188c 100644 (file)
@@ -17847,6 +17847,8 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm,
     if (!(job = qemuBlockJobDiskNew(disk, QEMU_BLOCKJOB_TYPE_COPY, device)))
         goto endjob;
 
+    disk->mirrorState = VIR_DOMAIN_DISK_MIRROR_STATE_NONE;
+
     /* Actually start the mirroring */
     qemuDomainObjEnterMonitor(driver, vm);
     /* qemuMonitorDriveMirror needs to honor the REUSE_EXT flag as specified