Whamcloud - gitweb
LU-8979 ldlm: disable brw lock request in recovery 28/24528/5
authorJinshan Xiong <jinshan.xiong@intel.com>
Tue, 13 Dec 2016 18:20:47 +0000 (10:20 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 3 Feb 2017 00:26:08 +0000 (00:26 +0000)
It shouldn't acquire local brw lock in recovery otherwise it may
cause the the invocation of ldlm_reprocess_all() in lock replay
phase, due to the async lock cancellation in ldlm_lock_decref(),
evetually it will cause the problem described in LU-8437.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ie54d84d154f025918d5196a5d2ecc4956bd57953
Reviewed-on: https://review.whamcloud.com/24528
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/target/tgt_handler.c

index e0f1e2d..872d7cc 100644 (file)
@@ -1608,6 +1608,9 @@ int tgt_brw_lock(struct ldlm_namespace *ns, struct ldlm_res_id *res_id,
        LASSERT(mode == LCK_PR || mode == LCK_PW);
        LASSERT(!lustre_handle_is_used(lh));
 
+       if (ns->ns_obd->obd_recovering)
+               RETURN(0);
+
        if (nrbufs == 0 || !(nb[0].rnb_flags & OBD_BRW_SRVLOCK))
                RETURN(0);