From ec7f0f09ee9ce5cc465124fade18b5b5b6196540 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 24 May 2016 10:57:45 +0200 Subject: [PATCH] LXC::Config: make mountpoint_backup_enabled a class method All subs in there are defined as class method and the commit which introduced this also used it as one in PVE::VZDump::LXC and thereby broke vzdump on containers as it passes wrong parameters to the function. --- src/PVE/LXC/Config.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index 83e5728..0bc20d1 100644 --- a/src/PVE/LXC/Config.pm +++ b/src/PVE/LXC/Config.pm @@ -45,7 +45,7 @@ sub cfs_config_path { } sub mountpoint_backup_enabled { - my ($mp_key, $mountpoint) = @_; + my ($class, $mp_key, $mountpoint) = @_; return 1 if $mp_key eq 'rootfs'; @@ -62,7 +62,7 @@ sub has_feature { my ($ms, $mountpoint) = @_; return if $err; # skip further test - return if $backup_only && !mountpoint_backup_enabled($ms, $mountpoint); + return if $backup_only && !$class->mountpoint_backup_enabled($ms, $mountpoint); $err = 1 if !PVE::Storage::volume_has_feature($storecfg, $feature, @@ -108,7 +108,7 @@ sub __snapshot_create_vol_snapshot { my $storecfg = PVE::Storage::config(); return if $snapname eq 'vzdump' && - !mountpoint_backup_enabled($ms, $mountpoint); + !$class->mountpoint_backup_enabled($ms, $mountpoint); PVE::Storage::volume_snapshot($storecfg, $mountpoint->{volume}, $snapname); } -- 2.39.5