]> xenbits.xensource.com Git - libvirt.git/commitdiff
zfs: Only raw volumes are supported
authorRichard Laager <rlaager@wiktel.com>
Tue, 15 Mar 2016 06:17:35 +0000 (01:17 -0500)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Mon, 21 Mar 2016 05:47:03 +0000 (08:47 +0300)
src/storage/storage_backend_zfs.c

index 4129aaeb6d3ad0f8130c2acca61f54ad3c6a0324..077543d9f295d16752d342819dc6c87af1921f40 100644 (file)
@@ -301,6 +301,12 @@ virStorageBackendZFSCreateVol(virConnectPtr conn ATTRIBUTE_UNUSED,
     int ret = -1;
     int volmode_needed = -1;
 
+    if (vol->target.format != VIR_STORAGE_FILE_RAW) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                       _("only RAW volumes are supported by this storage pool"));
+        return -1;
+    }
+
     vol->type = VIR_STORAGE_VOL_BLOCK;
 
     VIR_FREE(vol->target.path);