mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
cephfs: remove unsed cr util.Credentials
remove unused cr util.Credentials variable. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
0f451ed465
commit
ebb413534f
@ -134,7 +134,7 @@ func createCloneFromSubvolume(ctx context.Context, volID, cloneID volumeID, volO
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func cleanupCloneFromSubvolumeSnapshot(ctx context.Context, volID, cloneID volumeID, parentVolOpt *volumeOptions, cr *util.Credentials) error {
|
func cleanupCloneFromSubvolumeSnapshot(ctx context.Context, volID, cloneID volumeID, parentVolOpt *volumeOptions) error {
|
||||||
// snapshot name is same as clone name as we need a name which can be
|
// snapshot name is same as clone name as we need a name which can be
|
||||||
// identified during PVC-PVC cloning.
|
// identified during PVC-PVC cloning.
|
||||||
snapShotID := cloneID
|
snapShotID := cloneID
|
||||||
|
@ -568,7 +568,7 @@ func (cs *ControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateS
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
snap := snapshotInfo{}
|
snap := snapshotInfo{}
|
||||||
snap, err = doSnapshot(ctx, parentVolOptions, vid.FsSubvolName, sID.FsSnapshotName, cr)
|
snap, err = doSnapshot(ctx, parentVolOptions, vid.FsSubvolName, sID.FsSnapshotName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, status.Error(codes.Internal, err.Error())
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
}
|
}
|
||||||
@ -583,7 +583,7 @@ func (cs *ControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateS
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func doSnapshot(ctx context.Context, volOpt *volumeOptions, subvolumeName, snapshotName string, cr *util.Credentials) (snapshotInfo, error) {
|
func doSnapshot(ctx context.Context, volOpt *volumeOptions, subvolumeName, snapshotName string) (snapshotInfo, error) {
|
||||||
volID := volumeID(subvolumeName)
|
volID := volumeID(subvolumeName)
|
||||||
snapID := volumeID(snapshotName)
|
snapID := volumeID(snapshotName)
|
||||||
snap := snapshotInfo{}
|
snap := snapshotInfo{}
|
||||||
|
@ -90,8 +90,7 @@ func checkVolExists(ctx context.Context,
|
|||||||
err = cleanupCloneFromSubvolumeSnapshot(
|
err = cleanupCloneFromSubvolumeSnapshot(
|
||||||
ctx, volumeID(pvID.FsSubvolName),
|
ctx, volumeID(pvID.FsSubvolName),
|
||||||
volumeID(vid.FsSubvolName),
|
volumeID(vid.FsSubvolName),
|
||||||
parentVolOpt,
|
parentVolOpt)
|
||||||
cr)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -118,8 +117,7 @@ func checkVolExists(ctx context.Context,
|
|||||||
err = cleanupCloneFromSubvolumeSnapshot(
|
err = cleanupCloneFromSubvolumeSnapshot(
|
||||||
ctx, volumeID(pvID.FsSubvolName),
|
ctx, volumeID(pvID.FsSubvolName),
|
||||||
volumeID(vid.FsSubvolName),
|
volumeID(vid.FsSubvolName),
|
||||||
parentVolOpt,
|
parentVolOpt)
|
||||||
cr)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -160,7 +158,7 @@ func checkVolExists(ctx context.Context,
|
|||||||
vid.VolumeID, vid.FsSubvolName, volOptions.RequestName)
|
vid.VolumeID, vid.FsSubvolName, volOptions.RequestName)
|
||||||
|
|
||||||
if parentVolOpt != nil && pvID != nil {
|
if parentVolOpt != nil && pvID != nil {
|
||||||
err = cleanupCloneFromSubvolumeSnapshot(ctx, volumeID(pvID.FsSubvolName), volumeID(vid.FsSubvolName), parentVolOpt, cr)
|
err = cleanupCloneFromSubvolumeSnapshot(ctx, volumeID(pvID.FsSubvolName), volumeID(vid.FsSubvolName), parentVolOpt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user