[pve-devel] [PATCH 1/2] Bug-fix alloc_image in ZFSPlugin.pm
Wolfgang Link
w.link at proxmox.com
Mon Feb 16 10:14:49 CET 2015
Signed-off-by: Wolfgang Link <w.link at proxmox.com>
---
PVE/Storage/ZFSPlugin.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/PVE/Storage/ZFSPlugin.pm b/PVE/Storage/ZFSPlugin.pm
index f020985..e7acfb8 100644
--- a/PVE/Storage/ZFSPlugin.pm
+++ b/PVE/Storage/ZFSPlugin.pm
@@ -270,9 +270,11 @@ sub alloc_image {
die "illegal name '$name' - sould be 'vm-$vmid-*'\n"
if $name && $name !~ m/^vm-$vmid-/;
- my $volname = $class->zfs_find_free_diskname($storeid, $scfg, $vmid) if !$name;
+ my $volname = $name;
+
+ $volname = $class->zfs_find_free_diskname($storeid, $scfg, $vmid) if !$volname;
- $class->zfs_create_zvol($scfg, $name, $size);
+ $class->zfs_create_zvol($scfg, $volname, $size);
my $guid = $class->zfs_create_lu($scfg, $volname);
$class->zfs_add_lun_mapping_entry($scfg, $volname, $guid);
--
1.7.10.4
More information about the pve-devel
mailing list