mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +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>
This commit is contained in:
@ -475,6 +475,12 @@ func newSnapshotOptionsFromID(ctx context.Context, snapID string, cr *util.Crede
|
|||||||
sid.FsSnapshotName = imageAttributes.ImageName
|
sid.FsSnapshotName = imageAttributes.ImageName
|
||||||
sid.FsSubvolName = imageAttributes.SourceName
|
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))
|
info, err := getSnapshotInfo(ctx, &volOptions, cr, volumeID(sid.FsSnapshotName), volumeID(sid.FsSubvolName))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &volOptions, nil, &sid, err
|
return &volOptions, nil, &sid, err
|
||||||
|
Reference in New Issue
Block a user