From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id C87F01FF13C for ; Thu, 25 Jun 2026 18:41:57 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 83BD29BC; Thu, 25 Jun 2026 18:41:47 +0200 (CEST) From: "Max R. Carrara" To: pve-devel@lists.proxmox.com Subject: [PATCH pve-storage 8/9] luncmd: lio: modernize remaining LUN command subroutines Date: Thu, 25 Jun 2026 18:41:00 +0200 Message-ID: <20260625164110.706694-9-m.carrara@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260625164110.706694-1-m.carrara@proxmox.com> References: <20260625164110.706694-1-m.carrara@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1782405682635 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.080 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: RDAQ7JK2CFS3PTN7C5ZNFT5J32ZK7NPX X-Message-ID-Hash: RDAQ7JK2CFS3PTN7C5ZNFT5J32ZK7NPX X-MailFrom: m.carrara@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: As done with the subs before, make the `import_lun()`, `modify_lun()`, and `add_view()` "proper" private subroutines. Signed-off-by: Max R. Carrara --- src/PVE/Storage/LunCmd/LIO.pm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/PVE/Storage/LunCmd/LIO.pm b/src/PVE/Storage/LunCmd/LIO.pm index f4ad2ac8..534a0508 100644 --- a/src/PVE/Storage/LunCmd/LIO.pm +++ b/src/PVE/Storage/LunCmd/LIO.pm @@ -368,31 +368,31 @@ my sub delete_lun { die "Failed to delete LUN '$path'"; } -my $import_lun = sub { +my sub import_lun { my ($scfg, $config, $timeout, $method, @params) = @_; return create_lun($scfg, $config, $timeout, $method, @params); -}; +} # needed for example when the underlying ZFS volume has been resized -my $modify_lun = sub { +my sub modify_lun { my ($scfg, $config, $timeout, $method, @params) = @_; # Nothing to do on volume modification for LIO - return undef; -}; + return; +} -my $add_view = sub { +my sub add_view { my ($scfg, $config, $timeout, $method, @params) = @_; return ''; -}; +} my %lun_cmd_map = ( create_lu => sub { create_lun(@_) }, delete_lu => sub { delete_lun(@_) }, - import_lu => $import_lun, - modify_lu => $modify_lun, - add_view => $add_view, + import_lu => sub { import_lun(@_) }, + modify_lu => sub { modify_lun(@_) }, + add_view => sub { add_view(@_) }, list_view => sub { list_view(@_) }, list_lu => sub { list_lun(@_) }, ); -- 2.47.3