mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
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:
committed by
mergify[bot]
parent
14d6211d6d
commit
30244bf11b
@ -61,10 +61,11 @@ type SnapshotClient interface {
|
||||
|
||||
// snapshotClient is the implementation of SnapshotClient interface.
|
||||
type snapshotClient struct {
|
||||
*Snapshot // Embedded snapshot struct.
|
||||
clusterID string // Cluster ID.
|
||||
clusterName string // Cluster Name.
|
||||
conn *util.ClusterConnection // Cluster connection.
|
||||
*Snapshot // Embedded snapshot struct.
|
||||
clusterID string // Cluster ID.
|
||||
clusterName string // Cluster Name.
|
||||
enableMetadata bool // Set metadata on volume
|
||||
conn *util.ClusterConnection // Cluster connection.
|
||||
}
|
||||
|
||||
// Snapshot represents a subvolume snapshot and its cluster information.
|
||||
@ -79,6 +80,7 @@ func NewSnapshot(
|
||||
snapshotID,
|
||||
clusterID,
|
||||
clusterName string,
|
||||
setMetadata bool,
|
||||
vol *SubVolume,
|
||||
) SnapshotClient {
|
||||
return &snapshotClient{
|
||||
@ -86,9 +88,10 @@ func NewSnapshot(
|
||||
SnapshotID: snapshotID,
|
||||
SubVolume: vol,
|
||||
},
|
||||
clusterID: clusterID,
|
||||
clusterName: clusterName,
|
||||
conn: conn,
|
||||
clusterID: clusterID,
|
||||
clusterName: clusterName,
|
||||
enableMetadata: setMetadata,
|
||||
conn: conn,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user