From 4b25a4fd9391628569f6807d302534d970ed13ce Mon Sep 17 00:00:00 2001
From: qingsenLi
Date: Mon, 28 Jan 2019 23:17:48 +0800
Subject: [PATCH] fix some typos in /pkg/volume
---
pkg/volume/fc/fc_util.go | 2 +-
pkg/volume/util/operationexecutor/operation_generator.go | 6 +++---
pkg/volume/util/volumepathhandler/volume_path_handler.go | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/pkg/volume/fc/fc_util.go b/pkg/volume/fc/fc_util.go
index 2beafee94b..c1037c962b 100644
--- a/pkg/volume/fc/fc_util.go
+++ b/pkg/volume/fc/fc_util.go
@@ -319,7 +319,7 @@ func (util *fcUtil) DetachBlockFCDisk(c fcDiskUnmapper, mapPath, devicePath stri
}
volumeInfo := arr[len(arr)-1]
- // Search symbolick link which matches volumeInfo under /dev/disk/by-path or /dev/disk/by-id
+ // Search symbolic link which matches volumeInfo under /dev/disk/by-path or /dev/disk/by-id
// then find destination device path from the link
searchPath := byID
if strings.Contains(volumeInfo, "-lun-") {
diff --git a/pkg/volume/util/operationexecutor/operation_generator.go b/pkg/volume/util/operationexecutor/operation_generator.go
index 182792378d..fdbb6f7fa8 100644
--- a/pkg/volume/util/operationexecutor/operation_generator.go
+++ b/pkg/volume/util/operationexecutor/operation_generator.go
@@ -803,7 +803,7 @@ func (og *operationGenerator) GenerateUnmountDeviceFunc(
// After setup is done, create symbolic links on both global map path and pod
// device map path. Once symbolic links are created, take fd lock by
// loopback for the device to avoid silent volume replacement. This lock
-// will be realased once no one uses the device.
+// will be released once no one uses the device.
// If all steps are completed, the volume is marked as mounted.
func (og *operationGenerator) GenerateMapVolumeFunc(
waitForAttachTimeout time.Duration,
@@ -1033,7 +1033,7 @@ func (og *operationGenerator) GenerateUnmapVolumeFunc(
// GenerateUnmapDeviceFunc marks device as unmounted based on following steps.
// Check under globalMapPath dir if there isn't pod's symbolic links in it.
-// If symbolick link isn't there, the device isn't referenced from Pods.
+// If symbolic link isn't there, the device isn't referenced from Pods.
// Call plugin TearDownDevice to clean-up device connection, stored data under
// globalMapPath, these operations depend on plugin implementation.
// Once TearDownDevice is completed, remove globalMapPath dir.
@@ -1064,7 +1064,7 @@ func (og *operationGenerator) GenerateUnmapDeviceFunc(
unmapDeviceFunc := func() (error, error) {
// Search under globalMapPath dir if all symbolic links from pods have been removed already.
- // If symbolick links are there, pods may still refer the volume.
+ // If symbolic links are there, pods may still refer the volume.
globalMapPath := deviceToDetach.DeviceMountPath
refs, err := og.blkUtil.GetDeviceSymlinkRefs(deviceToDetach.DevicePath, globalMapPath)
if err != nil {
diff --git a/pkg/volume/util/volumepathhandler/volume_path_handler.go b/pkg/volume/util/volumepathhandler/volume_path_handler.go
index a7822efc3e..acaa6c3ab8 100644
--- a/pkg/volume/util/volumepathhandler/volume_path_handler.go
+++ b/pkg/volume/util/volumepathhandler/volume_path_handler.go
@@ -144,16 +144,16 @@ func (v VolumePathHandler) RemoveMapPath(mapPath string) error {
}
// IsSymlinkExist returns true if specified file exists and the type is symbolik link.
-// If file doesn't exist, or file exists but not symbolick link, return false with no error.
+// If file doesn't exist, or file exists but not symbolic link, return false with no error.
// On other cases, return false with error from Lstat().
func (v VolumePathHandler) IsSymlinkExist(mapPath string) (bool, error) {
fi, err := os.Lstat(mapPath)
if err == nil {
- // If file exits and it's symbolick link, return true and no error
+ // If file exits and it's symbolic link, return true and no error
if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
return true, nil
}
- // If file exits but it's not symbolick link, return fale and no error
+ // If file exits but it's not symbolic link, return fale and no error
return false, nil
}
// If file doesn't exist, return false and no error