From beab72b475c6006f53d5cab628cfdbe6dca09b32 Mon Sep 17 00:00:00 2001 From: Di Wang Date: Thu, 28 Jan 2016 06:20:07 -0500 Subject: [PATCH] LU-7564 osp: Do not match the lock for OSP In DNE operation, we do not need match the lock in the OSP cache, so to lock the remote object exclusively on master MDT, then other threads on master MDT will not be able to access the remote object at the same time. Signed-off-by: Di Wang Change-Id: I69a4f243fb26f4e37857fea6fd63b650b6ad046e Reviewed-on: http://review.whamcloud.com/18206 Tested-by: Jenkins Reviewed-by: Alex Zhuravlev Reviewed-by: Lai Siyao Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/osp/osp_md_object.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lustre/osp/osp_md_object.c b/lustre/osp/osp_md_object.c index 65efd68..21ccacf 100644 --- a/lustre/osp/osp_md_object.c +++ b/lustre/osp/osp_md_object.c @@ -889,19 +889,11 @@ static int osp_md_object_lock(const struct lu_env *env, struct lu_device *top_device; struct ptlrpc_request *req; int rc = 0; - __u64 flags = 0; - enum ldlm_mode mode; + __u64 flags = LDLM_FL_NO_LRU; res_id = einfo->ei_res_id; LASSERT(res_id != NULL); - mode = ldlm_lock_match(osp->opd_obd->obd_namespace, - LDLM_FL_BLOCK_GRANTED, res_id, - einfo->ei_type, policy, - einfo->ei_mode, lh, 0); - if (mode > 0) - return ELDLM_OK; - if (einfo->ei_nonblock) flags |= LDLM_FL_BLOCK_NOWAIT; if (einfo->ei_mode & (LCK_EX | LCK_PW)) -- 1.8.3.1