[pve-devel] [RFC pve-storage 30/36] plugin: lvm: update definition of subroutine `check_tags`

Max Carrara m.carrara at proxmox.com
Wed Jul 17 11:40:28 CEST 2024


So it's not just an anonymous sub assigned to a reference, but a
"proper" private subroutine instead. Also update its only call site
correspondingly.

Signed-off-by: Max Carrara <m.carrara at proxmox.com>
---
 src/PVE/Storage/LVMPlugin.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index a9bc178..df041aa 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -307,7 +307,7 @@ sub free_image {
     return undef;
 }
 
-my $check_tags = sub {
+my sub check_tags {
     my ($tags) = @_;
 
     return defined($tags) && $tags =~ /(^|,)pve-vm-\d+(,|$)/;
@@ -331,7 +331,7 @@ sub list_images {
 
 	    my $info = $dat->{$volname};
 
-	    next if $scfg->{tagged_only} && !&$check_tags($info->{tags});
+	    next if $scfg->{tagged_only} && !check_tags($info->{tags});
 
 	    # Allow mirrored and RAID LVs
 	    next if $info->{lv_type} !~ m/^[-mMrR]$/;
-- 
2.39.2





More information about the pve-devel mailing list