From 9cc7128b9b2bf444657dac6765decf9fb56aee8d Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Sun, 14 Mar 2021 07:29:11 +0300 Subject: [PATCH] LU-14522 ldlm: reprocess locks if enqueue failed if the export got disconnected during enqueue, ldlm_handle_enqueue0() drops the lock, but can skip reprocessing and this way all subsequent waiting locks conflicting with the dopped one may get stuck. with the patch most of racers succeed, otherwise 1/4 of runs get stuck Fixes: 37932c4beb ("LU-10175 ldlm: IBITS lock convert instead of cancel") Signed-off-by: Alex Zhuravlev Change-Id: I584b0de2656840da5dfa86a894fe02f138e1389d Reviewed-on: https://review.whamcloud.com/42031 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- lustre/ldlm/ldlm_lockd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 52930be..63d345d 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -1467,9 +1467,9 @@ existing_lock: out: req->rq_status = rc ?: err; /* return either error - b=11190 */ if (!req->rq_packed_final) { - err = lustre_pack_reply(req, 1, NULL, NULL); + int rc1 = lustre_pack_reply(req, 1, NULL, NULL); if (rc == 0) - rc = err; + rc = rc1; } /* @@ -1547,8 +1547,8 @@ retry: ldlm_resource_unlink_lock(lock); ldlm_lock_destroy_nolock(lock); unlock_res_and_lock(lock); - } + ldlm_reprocess_all(lock->l_resource, lock); } if (!err && !ldlm_is_cbpending(lock) && -- 1.8.3.1