btrfs: call free_image correctly
Currently, 'PVE::Storage::DirPlugin' is implicitly passed along as
$class, which means that if the base class's free_image calls another
method (e.g. filesystem_path) then the DirPlugin's method will be
used, rather than the one from BTRFSPlugin. Change it so that $class
itself is passed along.
See also commit 279d9de510 for context,
where the approach in this patch was suggested.
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
e1667a2253
commit
dcd8f3a3dd
@ -410,7 +410,7 @@ sub free_image {
|
||||
$class->parse_volname($volname);
|
||||
|
||||
if (!defined($format) || ($format ne 'subvol' && $format ne 'raw')) {
|
||||
return PVE::Storage::DirPlugin->free_image($storeid, $scfg, $volname, $isBase, $_format);
|
||||
return $class->SUPER::free_image($storeid, $scfg, $volname, $isBase, $_format);
|
||||
}
|
||||
|
||||
my $path = $class->filesystem_path($scfg, $volname);
|
||||
|
||||
Reference in New Issue
Block a user