Whamcloud - gitweb
LU-7564 osp: Do not match the lock for OSP 06/18206/3
authorDi Wang <di.wang@intel.com>
Thu, 28 Jan 2016 11:20:07 +0000 (06:20 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 5 Feb 2016 14:55:03 +0000 (14:55 +0000)
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 <di.wang@intel.com>
Change-Id: I69a4f243fb26f4e37857fea6fd63b650b6ad046e
Reviewed-on: http://review.whamcloud.com/18206
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osp/osp_md_object.c

index 65efd68..21ccacf 100644 (file)
@@ -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))