[pve-devel] [PATCH storage 1/2] Fix use of worker in vdisk_free

Fabian Ebner f.ebner at proxmox.com
Tue Oct 8 10:48:04 CEST 2019


Previously 'free_image' would be executed right away, which is not
the intended behaviour.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

This is a followup to [0] but it has nothing to do with the original patch
so I didn't put a v2.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-October/039281.html

 PVE/Storage.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/PVE/Storage.pm b/PVE/Storage.pm
index 298976f..64b79c9 100755
--- a/PVE/Storage.pm
+++ b/PVE/Storage.pm
@@ -760,7 +760,9 @@ sub vdisk_free {
 
 	my (undef, undef, undef, undef, undef, $isBase, $format) =
 	    $plugin->parse_volname($volname);
-	$cleanup_worker = $plugin->free_image($storeid, $scfg, $volname, $isBase, $format);
+	$cleanup_worker = sub {
+	    $plugin->free_image($storeid, $scfg, $volname, $isBase, $format);
+	};
     });
 
     return if !$cleanup_worker;
-- 
2.20.1





More information about the pve-devel mailing list