From 9055a0a1f3720aed844941213c676508bd30a69e Mon Sep 17 00:00:00 2001 From: Lai Siyao Date: Wed, 13 Jan 2021 17:29:50 +0800 Subject: [PATCH] LU-14119 mdc: set fid2path RPC interruptible Sometimes OI scrub can't fix the inconsistency in FID and name, and server will return -EINPROGRESS for fid2path request. Upon such failure, client will keep resending the request. Set such request to be interruptible to avoid deadlock. Lustre-change: https://review.whamcloud.com/41219 Lustre-commit: bf475262610671534b1b1a33cebb49d8380b74f7 Signed-off-by: Lai Siyao Change-Id: I82192cb8a8256064ca632cabfe5581b12e86423b Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/43266 Tested-by: jenkins Tested-by: Maloo --- lustre/mdc/mdc_request.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 9e8e516..5a29a28 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -2215,6 +2215,13 @@ static int mdc_get_info_rpc(struct obd_export *exp, RCL_SERVER, vallen); ptlrpc_request_set_replen(req); + /* if server failed to resolve FID, and OI scrub not able to fix it, it + * will return -EINPROGRESS, ptlrpc_queue_wait() will keep retrying, + * set request interruptible to avoid deadlock. + */ + if (KEY_IS(KEY_FID2PATH)) + req->rq_allow_intr = 1; + rc = ptlrpc_queue_wait(req); /* -EREMOTE means the get_info result is partial, and it needs to * continue on another MDT, see fid2path part in lmv_iocontrol */ -- 1.8.3.1