public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* applied: [PATCH storage] lvm{,thin} plugin: don't call parse_volume_id() from PVE::Storage module
@ 2026-02-05 14:36 Fiona Ebner
  0 siblings, 0 replies; only message in thread
From: Fiona Ebner @ 2026-02-05 14:36 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-02-05 14:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-05 14:36 applied: [PATCH storage] lvm{,thin} plugin: don't call parse_volume_id() from PVE::Storage module Fiona Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal