]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: snapshot: Don't skip check for qcow2 format with network disks
authorShanzhi Yu <shyu@redhat.com>
Sat, 28 Feb 2015 09:51:36 +0000 (17:51 +0800)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 4 Mar 2015 13:13:06 +0000 (14:13 +0100)
When the domain's source disk type is network, if source protocol is rbd
or sheepdog, the 'if().. break' will end the current case, which lead to
miss check the driver type is raw or qcow2. Libvirt will allow to create
internal snapshot for a running domain with raw format disk which based
on rbd storage.

While both protocols support internal snapshots of the disk qemu is not
able to use it as it requires some place to store the memory image. The
check if the disk is backed by a qcow2 image needs to be executed
always.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1179533
Signed-off-by: Shanzhi Yu <shyu@redhat.com>
src/qemu/qemu_driver.c

index 2026703cdfa7ac0a720a89fc163097f14d5ca0d9..ffa4e193d6d7167b9b6ce42368f97d23f49135ff 100644 (file)
@@ -13398,11 +13398,6 @@ qemuDomainSnapshotPrepare(virConnectPtr conn,
                                                       active) < 0)
                 goto cleanup;
 
-            if (dom_disk->src->type == VIR_STORAGE_TYPE_NETWORK &&
-                (dom_disk->src->protocol == VIR_STORAGE_NET_PROTOCOL_SHEEPDOG ||
-                 dom_disk->src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD)) {
-                break;
-            }
             if (vm->def->disks[i]->src->format > 0 &&
                 vm->def->disks[i]->src->format != VIR_STORAGE_FILE_QCOW2) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,