]> xenbits.xensource.com Git - libvirt.git/commitdiff
snapshot: remove mutually exclusive memory and disk-only duplicate check
authorGuannan Ren <gren@redhat.com>
Tue, 4 Jun 2013 08:42:55 +0000 (16:42 +0800)
committerGuannan Ren <gren@redhat.com>
Wed, 5 Jun 2013 02:37:45 +0000 (10:37 +0800)
The work was done at the time of snapshot xmlstring parsing

 if (offline && def->memory &&
     def->memory != VIR_DOMAIN_SNAPSHOT_LOCATION_NONE) {
     virReportError(...);
 }

src/qemu/qemu_driver.c

index 9d3f63272616751c1a0506610865f2653bfbf2b7..db5682306e57e11e85c9b0156952dbae6becb582 100644 (file)
@@ -11730,14 +11730,6 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
                          "with external checkpoints"));
         goto cleanup;
     }
-    if ((def->memory == VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL ||
-         def->memory == VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL) &&
-        flags & VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY) {
-        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
-                       _("disk-only snapshot creation is not compatible with "
-                         "memory snapshot"));
-        goto cleanup;
-    }
 
     if (flags & VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE) {
         /* Prevent circular chains */