mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
util: do not use mount-utils.IsLikelyNotMountPoint
anymore
`IsLikelyNotMountPoint()` is an optimized version for `IsMountPoint()` which can not detect all type of mounts (anymore). The slower `IsMountPoint()` is more safe to use. This can cause a slight performance regression in the case there are many mountpoints on the system, but correctness is more important than speed while mounting. Fixes: #4633 Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
76b4f53897
commit
79cf0321dd
@ -25,7 +25,6 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/ceph/ceph-csi/internal/util"
|
||||
"github.com/ceph/ceph-csi/internal/util/log"
|
||||
|
||||
"github.com/container-storage-interface/spec/lib/go/csi"
|
||||
@ -351,7 +350,7 @@ func FilesystemNodeGetVolumeStats(
|
||||
targetPath string,
|
||||
includeInodes bool,
|
||||
) (*csi.NodeGetVolumeStatsResponse, error) {
|
||||
isMnt, err := util.IsMountPoint(mounter, targetPath)
|
||||
isMnt, err := mounter.IsMountPoint(targetPath)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "targetpath %s does not exist", targetPath)
|
||||
|
Reference in New Issue
Block a user