From: Olga Krishtal Date: Mon, 11 Apr 2016 16:16:21 +0000 (+0300) Subject: storage: dir: .deleteVol callback for ploop volume X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=02d1e45654140ecb1169180b54052fb0f6e19eac;p=libvirt.git storage: dir: .deleteVol callback for ploop volume Recursively deletes whole directory of a ploop volume. To delete ploop image it has to be unmounted. Signed-off-by: Olga Krishtal --- diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index 8517b26bf8..ebfe7453e1 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -1264,6 +1264,9 @@ virStorageBackendFileSystemVolDelete(virConnectPtr conn ATTRIBUTE_UNUSED, } break; case VIR_STORAGE_VOL_PLOOP: + if (virFileDeleteTree(vol->target.path) < 0) + return -1; + break; case VIR_STORAGE_VOL_BLOCK: case VIR_STORAGE_VOL_NETWORK: case VIR_STORAGE_VOL_NETDIR: