mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rbd: make image features as optional parameter
Makes the rbd images features in the storageclass as optional so that default image features of librbd can be used. and also kept the option to user to specify the image features in the storageclass. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
fb3835691f
commit
d5c98f81a2
@ -471,11 +471,10 @@ func (ri *rbdImage) isInUse() (bool, error) {
|
||||
return len(watchers) > defaultWatchers, nil
|
||||
}
|
||||
|
||||
// checkImageFeatures check presence of imageFeatures parameter. It returns true when
|
||||
// there imageFeatures is missing or empty, skips missing parameter for non-static volumes
|
||||
// for backward compatibility.
|
||||
func checkImageFeatures(imageFeatures string, ok, static bool) bool {
|
||||
return static && (!ok || imageFeatures == "")
|
||||
// checkValidImageFeatures check presence of imageFeatures parameter. It returns false when
|
||||
// there imageFeatures is present and empty.
|
||||
func checkValidImageFeatures(imageFeatures string, ok bool) bool {
|
||||
return !(ok && imageFeatures == "")
|
||||
}
|
||||
|
||||
// isNotMountPoint checks whether MountPoint does not exists and
|
||||
|
Reference in New Issue
Block a user