mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
cephfs: remove unused Credentials argument from getCloneState()
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
055975f790
commit
8d08e8b37e
@ -93,7 +93,7 @@ func createCloneFromSubvolume(ctx context.Context, volID, cloneID volumeID, volO
|
|||||||
return cloneErr
|
return cloneErr
|
||||||
}
|
}
|
||||||
|
|
||||||
cloneState, cloneErr := volOpt.getCloneState(ctx, cr, cloneID)
|
cloneState, cloneErr := volOpt.getCloneState(ctx, cloneID)
|
||||||
if cloneErr != nil {
|
if cloneErr != nil {
|
||||||
return cloneErr
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -208,7 +208,7 @@ func createCloneFromSnapshot(ctx context.Context, parentVolOpt, volOptions *volu
|
|||||||
return nil
|
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()
|
fsa, err := vo.conn.GetFSAdmin()
|
||||||
if err != nil {
|
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)
|
util.ErrorLog(ctx, "could not get FSAdmin, can get clone status for volume %s with ID %s: %v", vo.FsName, string(volID), err)
|
||||||
|
@ -83,7 +83,7 @@ func checkVolExists(ctx context.Context,
|
|||||||
vid.FsSubvolName = imageData.ImageAttributes.ImageName
|
vid.FsSubvolName = imageData.ImageAttributes.ImageName
|
||||||
|
|
||||||
if sID != nil || pvID != nil {
|
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 cloneStateErr != nil {
|
||||||
if errors.Is(cloneStateErr, ErrVolumeNotFound) {
|
if errors.Is(cloneStateErr, ErrVolumeNotFound) {
|
||||||
if pvID != nil {
|
if pvID != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user