From: "Max R. Carrara" <m.carrara@proxmox.com>
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 [thread overview]
Message-ID: <20260625164110.706694-9-m.carrara@proxmox.com> (raw)
In-Reply-To: <20260625164110.706694-1-m.carrara@proxmox.com>
As done with the subs before, make the `import_lun()`, `modify_lun()`,
and `add_view()` "proper" private subroutines.
Signed-off-by: Max R. Carrara <m.carrara@proxmox.com>
---
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
next prev parent reply other threads:[~2026-06-25 16:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 16:40 [PATCH storage 0/9] Fix ZFS-over-iSCSI plugin w/ LIO Provider Issues Max R. Carrara
2026-06-25 16:40 ` [PATCH pve-storage 1/9] luncmd: lio: fix various errors by removing caching mechanism Max R. Carrara
2026-06-25 16:40 ` [PATCH pve-storage 2/9] luncmd: lio: fix LUN ops failing when passing nonstandard LUN path Max R. Carrara
2026-06-25 16:40 ` [PATCH pve-storage 3/9] luncmd: lio: remove rest of old parsing logic Max R. Carrara
2026-06-25 16:40 ` [PATCH pve-storage 4/9] luncmd: lio: modernize helpers Max R. Carrara
2026-06-25 16:40 ` [PATCH pve-storage 5/9] luncmd: lio: modernize & clean up `list_view()` and `list_lun()` subs Max R. Carrara
2026-06-25 16:40 ` [PATCH pve-storage 6/9] luncmd: lio: modernize sub `create_lun()` Max R. Carrara
2026-06-25 16:40 ` [PATCH pve-storage 7/9] luncmd: lio: modernize sub `delete_lun()` Max R. Carrara
2026-06-25 16:41 ` Max R. Carrara [this message]
2026-06-25 16:41 ` [PATCH pve-storage 9/9] luncmd: lio: use v5.36 and use subroutine signatures Max R. Carrara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260625164110.706694-9-m.carrara@proxmox.com \
--to=m.carrara@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox