From: Peter Krempa Date: Fri, 5 Feb 2016 15:55:09 +0000 (+0100) Subject: qemu: snapshot: Don't overwrite existing errors when thawing filesystems X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a9839fe044e8392bdedda18f5b4e4818eadaa636;p=libvirt.git qemu: snapshot: Don't overwrite existing errors when thawing filesystems 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. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f2db7d7622..a10671f9e6 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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;