Re: [PATCH] Revert "qemu: Do not override config XML in case of snapshot revert"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 5/20/19 9:22 AM, Michal Privoznik wrote:
This reverts commit dfd70ca1ebc623fcda788c414a472107b37b2bb8.

Pushed by a mistake, sorry. There's still some discussion going
on upstream.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---

Reviewed-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>


About the discussions, yeah they're still ongoing. I think Maxiwell is going to
take a look into how to implement two XMLs in the Libvirt snapshot, see
how hard would it be to pull it off.


Thanks,

DHB


/me needs to learn to clean branches before pushing some stuff. Sorry
for the noise. Pushed now.

  src/qemu/qemu_driver.c | 15 ++++-----------
  1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 06d8cb2471..9c0796b0a4 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -16243,7 +16243,6 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
      qemuDomainObjPrivatePtr priv;
      int rc;
      virDomainDefPtr config = NULL;
-    virDomainDefPtr inactiveConfig = NULL;
      virQEMUDriverConfigPtr cfg = NULL;
      virCapsPtr caps = NULL;
      bool was_stopped = false;
@@ -16458,7 +16457,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
                  goto endjob;
              }
              if (config) {
-                virDomainObjAssignDef(vm, config, false, &inactiveConfig);
+                virDomainObjAssignDef(vm, config, false, NULL);
                  virCPUDefFree(priv->origCPU);
                  VIR_STEAL_PTR(priv->origCPU, origCPU);
              }
@@ -16467,7 +16466,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
          load:
              was_stopped = true;
              if (config)
-                virDomainObjAssignDef(vm, config, false, &inactiveConfig);
+                virDomainObjAssignDef(vm, config, false, NULL);
/* No cookie means libvirt which saved the domain was too old to
               * mess up the CPU definitions.
@@ -16526,9 +16525,6 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
                                                   detail);
              }
          }
-        if (inactiveConfig)
-            VIR_STEAL_PTR(vm->newDef, inactiveConfig);
-
          break;
case VIR_DOMAIN_SNAPSHOT_SHUTDOWN:
@@ -16556,11 +16552,8 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
              qemuProcessEndJob(driver, vm);
              goto cleanup;
          }
-        if (config) {
-            virDomainObjAssignDef(vm, config, false, &inactiveConfig);
-            if (inactiveConfig)
-                VIR_STEAL_PTR(vm->newDef, inactiveConfig);
-        }
+        if (config)
+            virDomainObjAssignDef(vm, config, false, NULL);
if (flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING |
                       VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED)) {

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux