cephfs: fix subvolumegroup creation for multiple fs

In a cluster we can have multiple filesystem
for that we need to have a map of
subvolumegroups to check filesystem is created
nor not.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2022-09-07 11:46:22 +05:30
committed by mergify[bot]
parent 9d46478794
commit e56621cd66
3 changed files with 19 additions and 22 deletions

View File

@ -29,9 +29,7 @@ import (
var ErrSubVolSnapMetadataNotSupported = errors.New("subvolume snapshot metadata operations are not supported")
func (s *snapshotClient) supportsSubVolSnapMetadata() bool {
if _, keyPresent := clusterAdditionalInfo[s.clusterID]; !keyPresent {
clusterAdditionalInfo[s.clusterID] = &localClusterState{}
}
newLocalClusterState(s.clusterID)
return clusterAdditionalInfo[s.clusterID].subVolSnapshotMetadataState != unsupported
}