fix #1165: only check mount status when is_mountpoint is set
otherwise the status() method returns garbage for non-mount point directory storages.
This commit is contained in:
committed by
Wolfgang Bumiller
parent
a3577e2aef
commit
8b5ccc06b7
@ -76,12 +76,14 @@ sub path_is_mounted {
|
|||||||
sub status {
|
sub status {
|
||||||
my ($class, $storeid, $scfg, $cache) = @_;
|
my ($class, $storeid, $scfg, $cache) = @_;
|
||||||
|
|
||||||
$cache->{mountdata} = PVE::ProcFSTools::parse_proc_mounts()
|
if ($scfg->{is_mountpoint}) {
|
||||||
if !$cache->{mountdata};
|
$cache->{mountdata} = PVE::ProcFSTools::parse_proc_mounts()
|
||||||
|
if !$cache->{mountdata};
|
||||||
|
|
||||||
my $path = $scfg->{path};
|
my $path = $scfg->{path};
|
||||||
|
|
||||||
return undef if !path_is_mounted($path, $cache->{mountdata});
|
return undef if !path_is_mounted($path, $cache->{mountdata});
|
||||||
|
}
|
||||||
|
|
||||||
return $class->SUPER::status($storeid, $scfg, $cache);
|
return $class->SUPER::status($storeid, $scfg, $cache);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user