rbd: move core fields to rbdImage struct

moved ParentName, ParentPool and ImageFeatureSet
fields to the rbdImage struct as these are the
first citizens on the rbdImage.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2021-12-20 20:44:28 +05:30
committed by mergify[bot]
parent c6b288779a
commit edcb2b529b
5 changed files with 22 additions and 20 deletions

View File

@ -41,7 +41,7 @@ func TestHasSnapshotFeature(t *testing.T) {
rv := rbdVolume{}
for _, test := range tests {
rv.imageFeatureSet = librbd.FeatureSetFromNames(strings.Split(test.features, ","))
rv.ImageFeatureSet = librbd.FeatureSetFromNames(strings.Split(test.features, ","))
if got := rv.hasSnapshotFeature(); got != test.hasFeature {
t.Errorf("hasSnapshotFeature(%s) = %t, want %t", test.features, got, test.hasFeature)
}