From 0682f0e50089cb5e5a099aeb866d02694aa3ff60 Mon Sep 17 00:00:00 2001 From: Yug Date: Wed, 16 Sep 2020 19:19:10 +0530 Subject: [PATCH] cephfs: Fetch subvolume features in newSnapshotOptionsFromID Get subvolume features using subvolume info and update the volume options with Features parameter. Signed-off-by: Yug --- internal/cephfs/volumeoptions.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/cephfs/volumeoptions.go b/internal/cephfs/volumeoptions.go index fe6ee8e89..6d6b5d4d3 100644 --- a/internal/cephfs/volumeoptions.go +++ b/internal/cephfs/volumeoptions.go @@ -475,6 +475,12 @@ func newSnapshotOptionsFromID(ctx context.Context, snapID string, cr *util.Crede sid.FsSnapshotName = imageAttributes.ImageName sid.FsSubvolName = imageAttributes.SourceName + subvolInfo, err := getSubVolumeInfo(ctx, &volOptions, cr, volumeID(sid.FsSubvolName)) + if err != nil { + return &volOptions, nil, &sid, err + } + volOptions.Features = subvolInfo.Features + info, err := getSnapshotInfo(ctx, &volOptions, cr, volumeID(sid.FsSnapshotName), volumeID(sid.FsSubvolName)) if err != nil { return &volOptions, nil, &sid, err