rbd: add support for deep-flatten image feature

as deep-flatten is long supported in ceph and its
enabled by default in the librbd, providing an option
to enable it in cephcsi for the rbd images we are
creating.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2022-02-17 11:31:34 +05:30
committed by mergify[bot]
parent eb40fbcb18
commit fb3835691f
7 changed files with 89 additions and 9 deletions

View File

@ -209,6 +209,9 @@ var supportedFeatures = map[string]imageFeature{
needRbdNbd: true,
dependsOn: []string{librbd.FeatureNameExclusiveLock},
},
librbd.FeatureNameDeepFlatten: {
needRbdNbd: false,
},
}
// GetKrbdSupportedFeatures load the module if needed and return supported

View File

@ -152,6 +152,14 @@ func TestValidateImageFeatures(t *testing.T) {
true,
"invalid feature ayering",
},
{
"deep-flatten",
&rbdVolume{
Mounter: rbdDefaultMounter,
},
false,
"",
},
}
for _, test := range tests {