mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
cleanup: embed args into struct and pass it to detachRBDImageOrDeviceSpec
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
474100c1f1
commit
d67e88ccd0
@ -819,13 +819,16 @@ func (ns *NodeServer) NodeUnstageVolume(
|
||||
|
||||
// Unmapping rbd device
|
||||
imageSpec := imgInfo.String()
|
||||
if err = detachRBDImageOrDeviceSpec(
|
||||
ctx, imageSpec,
|
||||
true,
|
||||
imgInfo.NbdAccess,
|
||||
imgInfo.Encrypted,
|
||||
req.GetVolumeId(),
|
||||
imgInfo.UnmapOptions); err != nil {
|
||||
|
||||
dArgs := detachRBDImageArgs{
|
||||
imageOrDeviceSpec: imageSpec,
|
||||
isImageSpec: true,
|
||||
isNbd: imgInfo.NbdAccess,
|
||||
encrypted: imgInfo.Encrypted,
|
||||
volumeID: req.GetVolumeId(),
|
||||
unmapOptions: imgInfo.UnmapOptions,
|
||||
}
|
||||
if err = detachRBDImageOrDeviceSpec(ctx, dArgs); err != nil {
|
||||
util.ErrorLog(
|
||||
ctx,
|
||||
"error unmapping volume (%s) from staging path (%s): (%v)",
|
||||
|
Reference in New Issue
Block a user