[PATCH 5/7] storage:dir: .wipeVol is left unsupported for ploop volume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Returns error in case of vol-wipe cmd for a ploop volume

Signed-off-by: Olga Krishtal <okrishtal@xxxxxxxxxxxxx>
---
 src/storage/storage_backend.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index fddec3c..8b936ae 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -2162,6 +2162,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,
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]