]> git.proxmox.com Git - pve-storage.git/commitdiff
zfs: list images: don't use cache
authorFiona Ebner <f.ebner@proxmox.com>
Tue, 20 Dec 2022 13:16:37 +0000 (14:16 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 21 Dec 2022 09:46:15 +0000 (10:46 +0100)
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@proxmox.com>
PVE/Storage/ZFSPoolPlugin.pm

index 0f16e7d296d5412fdf4ba2f2f8dcce4029eab292..08998944721b016af8abe9b1fbf72052fa41d43a 100644 (file)
@@ -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) {