From a4f2c5617c80cefe90fee34e3bc81ebe367243d9 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Tue, 4 Aug 2020 00:21:25 +0530 Subject: [PATCH] cephfs: retrieve NewCSISnapshotJournal with namespace set Signed-off-by: Humble Chirammal --- internal/journal/voljournal.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/journal/voljournal.go b/internal/journal/voljournal.go index 8b83eda9b..bc09c913f 100644 --- a/internal/journal/voljournal.go +++ b/internal/journal/voljournal.go @@ -195,6 +195,14 @@ func NewCSIVolumeJournalWithNamespace(suffix, ns string) *Config { return j } +// NewCSISnapshotJournalWithNamespace returns an instance of CSIJournal for +// snapshots using a predetermined namespace value. +func NewCSISnapshotJournalWithNamespace(suffix, ns string) *Config { + j := NewCSISnapshotJournal(suffix) + j.namespace = ns + return j +} + // GetNameForUUID returns volume name. func (cj *Config) GetNameForUUID(prefix, uid string, isSnapshot bool) string { if prefix == "" {