From d7f6f85ea032497e97619ee22f9d05d42d9d396b Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 9 Jun 2021 15:18:46 +0200 Subject: [PATCH] fix find_free_disk_name invocations The interface takes the storeid now, not the image dir. Signed-off-by: Wolfgang Bumiller --- PVE/Storage/GlusterfsPlugin.pm | 4 ++-- PVE/Storage/Plugin.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PVE/Storage/GlusterfsPlugin.pm b/PVE/Storage/GlusterfsPlugin.pm index 5ec2f42..599bca2 100644 --- a/PVE/Storage/GlusterfsPlugin.pm +++ b/PVE/Storage/GlusterfsPlugin.pm @@ -215,7 +215,7 @@ sub clone_image { mkpath $imagedir; - my $name = $class->find_free_diskname($imagedir, $scfg, $vmid, "qcow2", 1); + my $name = $class->find_free_diskname($storeid, $scfg, $vmid, "qcow2", 1); warn "clone $volname: $vtype, $name, $vmid to $name (base=../$basevmid/$basename)\n"; @@ -243,7 +243,7 @@ sub alloc_image { mkpath $imagedir; - $name = $class->find_free_diskname($imagedir, $scfg, $vmid, $fmt, 1) if !$name; + $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1) if !$name; my (undef, $tmpfmt) = parse_name_dir($name); diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm index 4a10a1f..318d13a 100644 --- a/PVE/Storage/Plugin.pm +++ b/PVE/Storage/Plugin.pm @@ -695,7 +695,7 @@ sub clone_image { mkpath $imagedir; - my $name = $class->find_free_diskname($imagedir, $scfg, $vmid, "qcow2", 1); + my $name = $class->find_free_diskname($storeid, $scfg, $vmid, "qcow2", 1); warn "clone $volname: $vtype, $name, $vmid to $name (base=../$basevmid/$basename)\n"; @@ -727,7 +727,7 @@ sub alloc_image { mkpath $imagedir; - $name = $class->find_free_diskname($imagedir, $scfg, $vmid, $fmt, 1) if !$name; + $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1) if !$name; my (undef, $tmpfmt) = parse_name_dir($name);