]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuDomainCheckpointLoad: Don't align disks when restoring config from disk
authorPeter Krempa <pkrempa@redhat.com>
Tue, 8 Dec 2020 15:16:08 +0000 (16:16 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 9 Dec 2020 14:02:07 +0000 (15:02 +0100)
The alignment step is not really necessary once we've done it already
since we fully populate the definition. In case of checkpoints it was a
relic necessary for populating the 'idx' to match checkpoint disk to
definition disk, but that was already removed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_driver.c

index 7093fc619b0a215f8fe8464dfb9cc03695595769..0e5d7423dc22107af32278b7bc0ca3f2ed893049 100644 (file)
@@ -512,18 +512,11 @@ qemuDomainCheckpointLoad(virDomainObjPtr vm,
             continue;
         }
 
-        def = virDomainCheckpointDefParseString(xmlStr,
-                                                qemu_driver->xmlopt,
-                                                priv->qemuCaps,
-                                                flags);
-        if (!def || virDomainCheckpointAlignDisks(def) < 0) {
-            /* Nothing we can do here, skip this one */
-            virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Failed to parse checkpoint XML from file '%s'"),
-                           fullpath);
-            virObjectUnref(def);
+        if (!(def = virDomainCheckpointDefParseString(xmlStr,
+                                                      qemu_driver->xmlopt,
+                                                      priv->qemuCaps,
+                                                      flags)))
             continue;
-        }
 
         chk = virDomainCheckpointAssignDef(vm->checkpoints, def);
         if (chk == NULL)