提交 da04eab9 编写于 作者: M Michal Privoznik

Revert "qemu: Do not override config XML in case of snapshot revert"

This reverts commit dfd70ca1.

Pushed by a mistake, sorry. There's still some discussion going
on upstream.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 06a61a20
...@@ -16243,7 +16243,6 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, ...@@ -16243,7 +16243,6 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
qemuDomainObjPrivatePtr priv; qemuDomainObjPrivatePtr priv;
int rc; int rc;
virDomainDefPtr config = NULL; virDomainDefPtr config = NULL;
virDomainDefPtr inactiveConfig = NULL;
virQEMUDriverConfigPtr cfg = NULL; virQEMUDriverConfigPtr cfg = NULL;
virCapsPtr caps = NULL; virCapsPtr caps = NULL;
bool was_stopped = false; bool was_stopped = false;
...@@ -16458,7 +16457,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, ...@@ -16458,7 +16457,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
goto endjob; goto endjob;
} }
if (config) { if (config) {
virDomainObjAssignDef(vm, config, false, &inactiveConfig); virDomainObjAssignDef(vm, config, false, NULL);
virCPUDefFree(priv->origCPU); virCPUDefFree(priv->origCPU);
VIR_STEAL_PTR(priv->origCPU, origCPU); VIR_STEAL_PTR(priv->origCPU, origCPU);
} }
...@@ -16467,7 +16466,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, ...@@ -16467,7 +16466,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
load: load:
was_stopped = true; was_stopped = true;
if (config) if (config)
virDomainObjAssignDef(vm, config, false, &inactiveConfig); virDomainObjAssignDef(vm, config, false, NULL);
/* No cookie means libvirt which saved the domain was too old to /* No cookie means libvirt which saved the domain was too old to
* mess up the CPU definitions. * mess up the CPU definitions.
...@@ -16526,9 +16525,6 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, ...@@ -16526,9 +16525,6 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
detail); detail);
} }
} }
if (inactiveConfig)
VIR_STEAL_PTR(vm->newDef, inactiveConfig);
break; break;
case VIR_DOMAIN_SNAPSHOT_SHUTDOWN: case VIR_DOMAIN_SNAPSHOT_SHUTDOWN:
...@@ -16556,11 +16552,8 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, ...@@ -16556,11 +16552,8 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
qemuProcessEndJob(driver, vm); qemuProcessEndJob(driver, vm);
goto cleanup; goto cleanup;
} }
if (config) { if (config)
virDomainObjAssignDef(vm, config, false, &inactiveConfig); virDomainObjAssignDef(vm, config, false, NULL);
if (inactiveConfig)
VIR_STEAL_PTR(vm->newDef, inactiveConfig);
}
if (flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING | if (flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING |
VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED)) { VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册