From 6918cbe950143aaf6d4deda00415ef76b9f7425c Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Fri, 21 Aug 2020 17:58:37 +0200 Subject: [PATCH] rbd: rename ndbType parameter Fix "ndb" typo. Signed-off-by: Ilya Dryomov (cherry picked from commit d3f31187fc5d10ab7744cfe3d1d35a2462fb2d1b) --- internal/rbd/rbd_attach.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rbd/rbd_attach.go b/internal/rbd/rbd_attach.go index 708647305..22938be99 100644 --- a/internal/rbd/rbd_attach.go +++ b/internal/rbd/rbd_attach.go @@ -289,7 +289,7 @@ func detachRBDDevice(ctx context.Context, devicePath, volumeID, unmapOptions str // detachRBDImageOrDeviceSpec detaches an rbd imageSpec or devicePath, with additional checking // when imageSpec is used to decide if image is already unmapped. -func detachRBDImageOrDeviceSpec(ctx context.Context, imageOrDeviceSpec string, isImageSpec, ndbType, encrypted bool, volumeID, unmapOptions string) error { +func detachRBDImageOrDeviceSpec(ctx context.Context, imageOrDeviceSpec string, isImageSpec, isNbd, encrypted bool, volumeID, unmapOptions string) error { if encrypted { mapperFile, mapperPath := util.VolumeMapper(volumeID) mappedDevice, mapper, err := util.DeviceEncryptionStatus(ctx, mapperPath) @@ -311,7 +311,7 @@ func detachRBDImageOrDeviceSpec(ctx context.Context, imageOrDeviceSpec string, i } accessType := accessTypeKRbd - if ndbType { + if isNbd { accessType = accessTypeNbd } unmapArgs := []string{"unmap", "--device-type", accessType, imageOrDeviceSpec}