From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: applied: [PATCH storage] lvm{,thin} plugin: don't call parse_volume_id() from PVE::Storage module
Date: Thu, 5 Feb 2026 15:36:53 +0100 [thread overview]
Message-ID: <20260205143723.133344-1-f.ebner@proxmox.com> (raw)
Including PVE::Storage would mean introducing a cyclic dependency. The
PVE::Storage::parse_volume_id() function is just a thin wrapper around
PVE::Storage::Plugin::parse_volume_id(), so use that function
directly.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/Storage/LVMPlugin.pm | 5 +++--
src/PVE/Storage/LvmThinPlugin.pm | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index 102cf22..db34123 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -480,7 +480,7 @@ sub on_add_hook {
my ($class, $storeid, $scfg, %param) = @_;
if (my $base = $scfg->{base}) {
- my ($baseid, $volname) = PVE::Storage::parse_volume_id($base);
+ my ($baseid, $volname) = PVE::Storage::Plugin::parse_volume_id($base);
my $cfg = PVE::Storage::config();
my $basecfg = PVE::Storage::storage_config($cfg, $baseid, 1);
@@ -785,7 +785,8 @@ sub free_image {
my $snap = $snapshots->{$snapid};
next if $snapid eq 'current';
next if !$snap->{volid};
- my ($snap_storeid, $snap_volname) = PVE::Storage::parse_volume_id($snap->{volid});
+ my ($snap_storeid, $snap_volname) =
+ PVE::Storage::Plugin::parse_volume_id($snap->{volid});
push @$volnames, $snap_volname;
}
}
diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
index 2797d9e..99874b5 100644
--- a/src/PVE/Storage/LvmThinPlugin.pm
+++ b/src/PVE/Storage/LvmThinPlugin.pm
@@ -477,7 +477,7 @@ sub volume_import {
$with_snapshots,
$allow_rename,
);
- ($storeid, my $newname) = PVE::Storage::parse_volume_id($newvolid);
+ ($storeid, my $newname) = PVE::Storage::Plugin::parse_volume_id($newvolid);
$volname = $class->create_base($storeid, $scfg, $newname);
}
--
2.47.3
reply other threads:[~2026-02-05 14:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260205143723.133344-1-f.ebner@proxmox.com \
--to=f.ebner@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.