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 <okrishtal@virtuozzo.com>
This commit is contained in:
Olga Krishtal 2016-04-11 19:16:21 +03:00 committed by Ján Tomko
parent cff2138b71
commit 02d1e45654

View File

@ -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: