mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
cephfs: Fetch subvolume features in newSnapshotOptionsFromID
Get subvolume features using subvolume info and update the
volume options with Features parameter.
Signed-off-by: Yug <yuggupta27@gmail.com>
(cherry picked from commit 0682f0e500
)
This commit is contained in:
parent
6a64958876
commit
8170e12114
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user