From 4bca07f115e6beada1462599cf362c3b84767576 Mon Sep 17 00:00:00 2001 From: Jinshan Xiong Date: Tue, 13 Dec 2016 10:20:47 -0800 Subject: [PATCH] LU-8979 ldlm: disable brw lock request in recovery 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 Change-Id: Ie54d84d154f025918d5196a5d2ecc4956bd57953 Reviewed-on: https://review.whamcloud.com/24528 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin --- lustre/target/tgt_handler.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lustre/target/tgt_handler.c b/lustre/target/tgt_handler.c index e0f1e2d..872d7cc 100644 --- a/lustre/target/tgt_handler.c +++ b/lustre/target/tgt_handler.c @@ -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); -- 1.8.3.1