[PATCH 1/3] storage: Add virCheckFlags to virStorageBackendRBDDeleteVol

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

 



The initial commit '74951eade' did not include the proper check for whether
any flags are supported by the driver.

Even though the driver doesn't support VIR_STORAGE_VOL_DELETE_ZEROED,
it still checks and allows the processing to continue

Also add the new VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTS since it is handled
as of commit id '3c7590e0a'.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/storage/storage_backend_rbd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c
index b66fcbe..cdbfdee 100644
--- a/src/storage/storage_backend_rbd.c
+++ b/src/storage/storage_backend_rbd.c
@@ -513,6 +513,9 @@ static int virStorageBackendRBDDeleteVol(virConnectPtr conn,
     ptr.cluster = NULL;
     ptr.ioctx = NULL;
 
+    virCheckFlags(VIR_STORAGE_VOL_DELETE_ZEROED |
+                  VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTS, -1);
+
     VIR_DEBUG("Removing RBD image %s/%s", pool->def->source.name, vol->name);
 
     if (flags & VIR_STORAGE_VOL_DELETE_ZEROED)
-- 
2.5.0

--
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]