]> git.proxmox.com Git - pve-storage.git/commitdiff
fix find_free_disk_name invocations
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 9 Jun 2021 13:18:46 +0000 (15:18 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 15 Jun 2021 12:36:12 +0000 (14:36 +0200)
The interface takes the storeid now, not the image dir.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
PVE/Storage/GlusterfsPlugin.pm
PVE/Storage/Plugin.pm

index 5ec2f42e8d802a972fb53807b5ec689b98e0f711..599bca29cd6551e6ded23607d58084355b414c42 100644 (file)
@@ -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);
 
index 4a10a1fef93ceec3e9409a157bd2a9351cf95d53..318d13a6b37acc5e1e356e0a80d346c71fe2ee51 100644 (file)
@@ -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);