From a9839fe044e8392bdedda18f5b4e4818eadaa636 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 5 Feb 2016 16:55:09 +0100 Subject: [PATCH] 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. --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- GitLab