1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 06:50:22 +03:00

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.
This commit is contained in:
Peter Krempa 2016-02-05 16:55:09 +01:00
parent 6450c9e4cf
commit a9839fe044

View 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;