map_volume: fall back to 'path'

Adds a fallback to 'Plugin::path' in the default implementation of
'map_volume' to simplify a common case of calling 'map_volume' followed
by a defined-check and a call to path if it is not. The path is now
always returned if the plugin in question does not override
'map_volume'.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
This commit is contained in:
Mira Limbeck
2019-04-29 15:00:38 +02:00
committed by Thomas Lamprecht
parent b5c8278a3e
commit d560ec2860

View File

@ -966,7 +966,8 @@ sub deactivate_storage {
sub map_volume {
my ($class, $storeid, $scfg, $volname, $snapname) = @_;
return undef;
my ($path) = $class->path($scfg, $volname, $storeid, $snapname);
return $path;
}
sub unmap_volume {