mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rbd: remove redundant util.Credentials arg from flattenRbdImage()
With introduction of go-ceph rbd admin task api, credentials are no longer required to be passed as cli cmd is not invoked. Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
@ -375,7 +375,7 @@ func (ns *NodeServer) stageTransaction(
|
||||
volOptions.readOnly = true
|
||||
}
|
||||
|
||||
err = flattenImageBeforeMapping(ctx, volOptions, cr)
|
||||
err = flattenImageBeforeMapping(ctx, volOptions)
|
||||
if err != nil {
|
||||
return transaction, err
|
||||
}
|
||||
@ -527,8 +527,7 @@ func resizeEncryptedDevice(ctx context.Context, volID, stagingTargetPath, device
|
||||
|
||||
func flattenImageBeforeMapping(
|
||||
ctx context.Context,
|
||||
volOptions *rbdVolume,
|
||||
cr *util.Credentials) error {
|
||||
volOptions *rbdVolume) error {
|
||||
var err error
|
||||
var feature bool
|
||||
var depth uint
|
||||
@ -550,7 +549,7 @@ func flattenImageBeforeMapping(
|
||||
return err
|
||||
}
|
||||
if feature || depth != 0 {
|
||||
err = volOptions.flattenRbdImage(ctx, cr, true, rbdHardMaxCloneDepth, rbdSoftMaxCloneDepth)
|
||||
err = volOptions.flattenRbdImage(ctx, true, rbdHardMaxCloneDepth, rbdSoftMaxCloneDepth)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user