[pve-devel] [PATCH v2 storage 2/3] zfs: list images: don't use cache
Fiona Ebner
f.ebner at proxmox.com
Tue Dec 20 14:16:37 CET 2022
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 <f.ebner at proxmox.com>
---
New in v2.
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) {
--
2.30.2
More information about the pve-devel
mailing list