[pve-devel] [PATCH 3/9] zfs: copy free_image
Wolfgang Link
w.link at proxmox.com
Fri Jan 23 10:32:39 CET 2015
modify it for ZFSDirPlugin.
Signed-off-by: Wolfgang Link <w.link at proxmox.com>
---
PVE/Storage/ZFSDirPlugin.pm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/PVE/Storage/ZFSDirPlugin.pm b/PVE/Storage/ZFSDirPlugin.pm
index da53525..e3c1a9d 100644
--- a/PVE/Storage/ZFSDirPlugin.pm
+++ b/PVE/Storage/ZFSDirPlugin.pm
@@ -173,6 +173,17 @@ sub alloc_image {
}
+sub free_image {
+ my ($class, $storeid, $scfg, $volname, $isBase) = @_;
+
+ my (undef, $name, undef) = $class->parse_volname($volname);
+
+ eval { $class->zfs_delete_zvol($scfg, $name); };
+ die $@ if $@;
+
+ return undef;
+}
+
sub zfs_get_pool_stats {
my ($class, $scfg) = @_;
--
1.7.10.4
More information about the pve-devel
mailing list