]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: Add virCheckFlags to virStorageBackendRBDDeleteVol
authorJohn Ferlan <jferlan@redhat.com>
Wed, 2 Dec 2015 21:38:50 +0000 (16:38 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 18 Dec 2015 15:51:08 +0000 (10:51 -0500)
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'.

src/storage/storage_backend_rbd.c

index b66fcbe9cd69689753af260322cb7d57413db029..cdbfdee98505492407669130712046783223c3cf 100644 (file)
@@ -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)