diff --git a/internal/cephfs/clone.go b/internal/cephfs/clone.go index 567d4a94b..99dbc5573 100644 --- a/internal/cephfs/clone.go +++ b/internal/cephfs/clone.go @@ -93,7 +93,7 @@ func createCloneFromSubvolume(ctx context.Context, volID, cloneID volumeID, volO return cloneErr } - cloneState, cloneErr := volOpt.getCloneState(ctx, cr, cloneID) + cloneState, cloneErr := volOpt.getCloneState(ctx, cloneID) if cloneErr != nil { return cloneErr } @@ -183,7 +183,7 @@ func createCloneFromSnapshot(ctx context.Context, parentVolOpt, volOptions *volu } }() - cloneState, err := volOptions.getCloneState(ctx, cr, volumeID(vID.FsSubvolName)) + cloneState, err := volOptions.getCloneState(ctx, volumeID(vID.FsSubvolName)) if err != nil { return err } @@ -208,7 +208,7 @@ func createCloneFromSnapshot(ctx context.Context, parentVolOpt, volOptions *volu return nil } -func (vo *volumeOptions) getCloneState(ctx context.Context, cr *util.Credentials, volID volumeID) (cephFSCloneState, error) { +func (vo *volumeOptions) getCloneState(ctx context.Context, volID volumeID) (cephFSCloneState, error) { fsa, err := vo.conn.GetFSAdmin() if err != nil { util.ErrorLog(ctx, "could not get FSAdmin, can get clone status for volume %s with ID %s: %v", vo.FsName, string(volID), err) diff --git a/internal/cephfs/fsjournal.go b/internal/cephfs/fsjournal.go index 53b5c14e2..ee1cc8691 100644 --- a/internal/cephfs/fsjournal.go +++ b/internal/cephfs/fsjournal.go @@ -83,7 +83,7 @@ func checkVolExists(ctx context.Context, vid.FsSubvolName = imageData.ImageAttributes.ImageName if sID != nil || pvID != nil { - cloneState, cloneStateErr := volOptions.getCloneState(ctx, cr, volumeID(vid.FsSubvolName)) + cloneState, cloneStateErr := volOptions.getCloneState(ctx, volumeID(vid.FsSubvolName)) if cloneStateErr != nil { if errors.Is(cloneStateErr, ErrVolumeNotFound) { if pvID != nil {