From e088e8fd2e35d5982a1fad7be47d787015df464d Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Tue, 13 Jul 2021 10:58:32 +0530 Subject: [PATCH] cephfs: Get rid of locking at nodepublish Considering kubelet make sure the stage and publish operations are serialized, we dont need any extra locking in nodePublish Signed-off-by: Humble Chirammal --- internal/cephfs/nodeserver.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/internal/cephfs/nodeserver.go b/internal/cephfs/nodeserver.go index c53d418f4..df8ad2456 100644 --- a/internal/cephfs/nodeserver.go +++ b/internal/cephfs/nodeserver.go @@ -217,11 +217,8 @@ func (ns *NodeServer) NodePublishVolume( targetPath := req.GetTargetPath() volID := req.GetVolumeId() - if acquired := ns.VolumeLocks.TryAcquire(volID); !acquired { - util.ErrorLog(ctx, util.VolumeOperationAlreadyExistsFmt, volID) - return nil, status.Errorf(codes.Aborted, util.VolumeOperationAlreadyExistsFmt, volID) - } - defer ns.VolumeLocks.Release(volID) + // Considering kubelet make sure the stage and publish operations + // are serialized, we dont need any extra locking in nodePublish if err := util.CreateMountPoint(targetPath); err != nil { util.ErrorLog(ctx, "failed to create mount point at %s: %v", targetPath, err)