From 2a6fda5b369c59a320941848968597244b8f3583 Mon Sep 17 00:00:00 2001 From: Alexander Boyko Date: Mon, 28 Nov 2022 09:20:05 -0500 Subject: [PATCH] LU-16271 ptlrpc: fix eviction right after recovery When recovery is finished exports could be timedout since recovery thread waits stale clients, and no more requests come after final ping. This was handled as exports timers update after final ping processing. LU-16002 introduced fast evictions and brings error - eviction right after recovery. Process exports timers updates before obd_recovering is cleared. Fixes: 6bdeda7afe ("LU-16002 ptlrpc: reduce pinger eviction time") Test-Parameters: testlist=replay-single env=ONLY=89,ONLY_REPEAT=20 Signed-off-by: Alexander Boyko Change-Id: Ibf3b2f632d6d3aa1de57038fdecbec38cf9a97cf Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49257 Reviewed-by: Alexander Zarochentsev Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/ldlm/ldlm_lib.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 2a7aa27..335c942 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -2825,6 +2825,15 @@ static int target_recovery_thread(void *arg) OBP(obd, iocontrol)(OBD_IOC_LLOG_CANCEL, obd->obd_self_export, 0, NULL, NULL); + list_for_each_entry(req, &obd->obd_final_req_queue, rq_list) { + /* + * Because the waiting client can not send ping to server, + * so we need refresh the last_request_time, to avoid the + * export is being evicted + */ + ptlrpc_update_export_timer(req->rq_export, 0); + } + /* * We drop recoverying flag to forward all new requests * to regular mds_handle() since now @@ -2843,12 +2852,6 @@ static int target_recovery_thread(void *arg) libcfs_nidstr(&req->rq_peer.nid)); handle_recovery_req(thread, req, trd->trd_recovery_handler); - /* - * Because the waiting client can not send ping to server, - * so we need refresh the last_request_time, to avoid the - * export is being evicted - */ - ptlrpc_update_export_timer(req->rq_export, 0); target_request_copy_put(req); } -- 1.8.3.1