]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: blockcopy: Don't remove existing disk mirror info
authorPeter Krempa <pkrempa@redhat.com>
Wed, 25 Jun 2014 16:11:17 +0000 (18:11 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 26 Jun 2014 08:18:47 +0000 (10:18 +0200)
When creating a new disk mirror the new struct is stored in a separate
variable until everything went well. The removed hunk would actually
remove existing mirror information for example when the api would be run
if a mirror still exists.

src/qemu/qemu_driver.c

index 775dc4eb7dd2b145af2f931d4a542014cc42245f..d34da6f5b8b9adc4a30397c459dce4cc5f2079d3 100644 (file)
@@ -15410,10 +15410,6 @@ qemuDomainBlockCopy(virDomainObjPtr vm,
  endjob:
     if (need_unlink && unlink(dest))
         VIR_WARN("unable to unlink just-created %s", dest);
-    if (ret < 0 && disk) {
-        virStorageSourceFree(disk->mirror);
-        disk->mirror = NULL;
-    }
     virStorageSourceFree(mirror);
     if (!qemuDomainObjEndJob(driver, vm))
         vm = NULL;