fix #3555: BTRFS: call DirPlugin's free_image correctly

The method is only derived in the DirPlugin module from the base
Plugin, so we do not have it available there through a static module
method call using ::, but only when using a class dereference.

Other fix options would have been:

  PVE::Storage::Plugin::free_image(@_);

or:
  $class->SUPER::free_image($storeid, ...);

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
[ Thomas: add some background to the commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Hannes Laimer
2021-07-30 13:04:55 +02:00
committed by Thomas Lamprecht
parent b11d054be0
commit 279d9de510

View File

@ -410,7 +410,7 @@ sub free_image {
$class->parse_volname($volname);
if ($format ne 'subvol' && $format ne 'raw') {
return PVE::Storage::DirPlugin::free_image(@_);
return PVE::Storage::DirPlugin->free_image($storeid, $scfg, $volname, $isBase, $_format);
}
my $path = $class->filesystem_path($scfg, $volname);