From 91c192f3490dc0939b5a48059e8de9ead0cd67eb Mon Sep 17 00:00:00 2001 From: Kevin Scott Adams Date: Thu, 30 Jul 2020 14:22:22 -0400 Subject: [PATCH] Reduce loop from running through all elements - Just addign a 'last' statement once an extent is found. No since looking for more after the extent is found because there is no more. Should make plugin run a bit faster. --- perl5/PVE/Storage/LunCmd/FreeNAS.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/perl5/PVE/Storage/LunCmd/FreeNAS.pm b/perl5/PVE/Storage/LunCmd/FreeNAS.pm index 5dec053..cede927 100644 --- a/perl5/PVE/Storage/LunCmd/FreeNAS.pm +++ b/perl5/PVE/Storage/LunCmd/FreeNAS.pm @@ -695,6 +695,7 @@ sub freenas_list_lu { } $node->{$freenas_api_variables->{'lunid'}} .= $iscsi_lunid; push(@luns , $node); + last; } } }