cephfs: snapshots honor --setmetadata option

`--setmetadata` is false by default, honoring it
will keep the metadata disabled by default

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
Prasanna Kumar Kalever
2022-07-28 17:56:55 +05:30
committed by mergify[bot]
parent 14d6211d6d
commit 30244bf11b
6 changed files with 35 additions and 32 deletions

View File

@ -749,7 +749,7 @@ func NewSnapshotOptionsFromID(
volOptions.Size = subvolInfo.BytesQuota
volOptions.RootPath = subvolInfo.Path
snap := core.NewSnapshot(volOptions.conn, sid.FsSnapshotName,
volOptions.ClusterID, clusterName, &volOptions.SubVolume)
volOptions.ClusterID, clusterName, setMetadata, &volOptions.SubVolume)
info, err := snap.GetSnapshotInfo(ctx)
if err != nil {
return &volOptions, nil, &sid, err