From 4470f0cbe94c8b7a6c480012e8fd20d124c9c9bb Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Tue, 20 Dec 2022 14:16:37 +0100 Subject: [PATCH] zfs: list images: don't use cache There is no caller using $cache and the same $storeid multiple times, so there is no need to keep the cache. Signed-off-by: Fiona Ebner --- PVE/Storage/ZFSPoolPlugin.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm index 0f16e7d..0899894 100644 --- a/PVE/Storage/ZFSPoolPlugin.pm +++ b/PVE/Storage/ZFSPoolPlugin.pm @@ -254,12 +254,11 @@ sub free_image { sub list_images { my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_; - $cache->{zfs}->{$storeid} = $class->zfs_list_zvol($scfg) - if !$cache->{zfs}->{$storeid}; + my $zfs_list = $class->zfs_list_zvol($scfg); my $res = []; - if (my $dat = $cache->{zfs}->{$storeid}) { + if (my $dat = $zfs_list) { foreach my $image (keys %$dat) {