]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: snapshot: Don't overwrite existing errors when thawing filesystems
authorPeter Krempa <pkrempa@redhat.com>
Fri, 5 Feb 2016 15:55:09 +0000 (16:55 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 8 Feb 2016 07:50:00 +0000 (08:50 +0100)
If we are attempting to thaw the filesystems on error, the code would
overwrite the error code that caused the snapshot to fail with the error
of thawing the filesystem. Since the thawing function allows control of
error reporting behavior we can use this feature.

src/qemu/qemu_driver.c

index f2db7d76228d291213f9917eb4740a2d070e9130..a10671f9e63bcc0f043b2966fb67584bc77bc5dc 100644 (file)
@@ -14696,7 +14696,7 @@ qemuDomainSnapshotCreateActiveExternal(virConnectPtr conn,
     }
 
     if (thaw != 0 &&
-        qemuDomainSnapshotFSThaw(driver, vm, thaw > 0) < 0) {
+        qemuDomainSnapshotFSThaw(driver, vm, ret == 0 && thaw > 0) < 0) {
         /* helper reported the error, if it was needed */
         if (thaw > 0)
             ret = -1;