cephfs: remove unused Credentials argument from getCloneState()

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-11-04 11:28:06 +01:00 committed by mergify[bot]
parent 055975f790
commit 8d08e8b37e
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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 {