[libvirt] [PATCH] qemu: call endjob in RevertToSnapshot
Jincheng Miao
jmiao at redhat.com
Wed Aug 27 02:10:33 UTC 2014
In qemuDomainRevertToSnapshot(), it will check snap->def->state.
But when the state is PMSUSPENDED/NOSTATE/BLOCKED, it forgets to
call qemuDomainObjEndJob.
Signed-off-by: Jincheng Miao <jmiao at redhat.com>
---
src/qemu/qemu_driver.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f5b17ba..2db507f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14294,7 +14294,7 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("qemu doesn't support reversion of snapshot taken in "
"PMSUSPENDED state"));
- goto cleanup;
+ goto endjob;
case VIR_DOMAIN_NOSTATE:
case VIR_DOMAIN_BLOCKED:
@@ -14303,7 +14303,7 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
_("Invalid target domain state '%s'. Refusing "
"snapshot reversion"),
virDomainStateTypeToString(snap->def->state));
- goto cleanup;
+ goto endjob;
}
ret = 0;
--
1.7.1
More information about the libvir-list
mailing list