]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: dir: .wipeVol is left unsupported for ploop volume
authorOlga Krishtal <okrishtal@virtuozzo.com>
Mon, 11 Apr 2016 16:16:23 +0000 (19:16 +0300)
committerJán Tomko <jtomko@redhat.com>
Fri, 15 Apr 2016 15:27:32 +0000 (17:27 +0200)
Returns error in case of vol-wipe cmd for a ploop volume

Signed-off-by: Olga Krishtal <okrishtal@virtuozzo.com>
src/storage/storage_backend.c

index 5ee1638dd16ebef1cf813c4a3d4616d94a9db8a5..3a5a7ea813712d8dff4703df53e8e88a7c64aae5 100644 (file)
@@ -2163,6 +2163,12 @@ virStorageBackendVolWipeLocal(virConnectPtr conn ATTRIBUTE_UNUSED,
     VIR_DEBUG("Wiping volume with path '%s' and algorithm %u",
               vol->target.path, algorithm);
 
+    if (vol->target.format == VIR_STORAGE_FILE_PLOOP) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                       _("wiping for ploop volumes is not supported"));
+        goto cleanup;
+    }
+
     fd = open(vol->target.path, O_RDWR);
     if (fd == -1) {
         virReportSystemError(errno,