From c494e8b18e780907cc3928367fc7b6a9e90d1e9d Mon Sep 17 00:00:00 2001 From: carlory Date: Thu, 23 Nov 2023 16:36:44 +0800 Subject: [PATCH] fix incorrect getDeviceNameFromMount comment --- pkg/volume/util/hostutil/hostutil.go | 1 + pkg/volume/util/hostutil/hostutil_linux.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/volume/util/hostutil/hostutil.go b/pkg/volume/util/hostutil/hostutil.go index dfe165aae36..6624fc616e5 100644 --- a/pkg/volume/util/hostutil/hostutil.go +++ b/pkg/volume/util/hostutil/hostutil.go @@ -50,6 +50,7 @@ type HostUtils interface { PathIsDevice(pathname string) (bool, error) // GetDeviceNameFromMount finds the device name by checking the mount path // to get the global mount path within its plugin directory. + // TODO: Remove this method once the rbd and vsphere plugins are removed from in-tree. GetDeviceNameFromMount(mounter mount.Interface, mountPath, pluginMountDir string) (string, error) // MakeRShared checks that given path is on a mount with 'rshared' mount // propagation. If not, it bind-mounts the path as rshared. diff --git a/pkg/volume/util/hostutil/hostutil_linux.go b/pkg/volume/util/hostutil/hostutil_linux.go index 5c687d9f447..cc480407cce 100644 --- a/pkg/volume/util/hostutil/hostutil_linux.go +++ b/pkg/volume/util/hostutil/hostutil_linux.go @@ -109,7 +109,7 @@ func (hu *HostUtil) GetDeviceNameFromMount(mounter mount.Interface, mountPath, p return getDeviceNameFromMount(mounter, mountPath, pluginMountDir) } -// getDeviceNameFromMountLinux find the device name from /proc/mounts in which +// getDeviceNameFromMount find the device name from /proc/self/mountinfo in which // the mount path reference should match the given plugin mount directory. In case no mount path reference // matches, returns the volume name taken from its given mountPath func getDeviceNameFromMount(mounter mount.Interface, mountPath, pluginMountDir string) (string, error) {