[pve-devel] [RFC pve-storage 15/36] plugin: btrfs: replace deprecated helpers from directory plugin
Max Carrara
m.carrara at proxmox.com
Wed Jul 17 11:40:13 CEST 2024
with the recently moved ones from `Common` and `Common::Path`.
Signed-off-by: Max Carrara <m.carrara at proxmox.com>
---
src/PVE/Storage/BTRFSPlugin.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index a503404..10fd441 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -13,6 +13,8 @@ use POSIX qw(EEXIST);
use PVE::Tools qw(run_command dir_glob_foreach);
+use PVE::Storage::Common qw(storage_parse_is_mountpoint);
+use PVE::Storage::Common::Path qw(path_is_mounted);
use PVE::Storage::DirPlugin;
use constant {
@@ -122,8 +124,8 @@ sub activate_storage {
my $path = $scfg->{path};
$class->config_aware_base_mkdir($scfg, $path);
- my $mp = PVE::Storage::DirPlugin::parse_is_mountpoint($scfg);
- if (defined($mp) && !PVE::Storage::DirPlugin::path_is_mounted($mp, $cache->{mountdata})) {
+ my $mp = storage_parse_is_mountpoint($scfg);
+ if (defined($mp) && !path_is_mounted($mp, $cache->{mountdata})) {
die "unable to activate storage '$storeid' - directory is expected to be a mount point but"
." is not mounted: '$mp'\n";
}
--
2.39.2
More information about the pve-devel
mailing list