Whamcloud - gitweb
LU-14119 mdc: set fid2path RPC interruptible 19/41219/3
authorLai Siyao <lai.siyao@whamcloud.com>
Wed, 13 Jan 2021 09:29:50 +0000 (17:29 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 6 Apr 2021 03:02:26 +0000 (03:02 +0000)
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.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I82192cb8a8256064ca632cabfe5581b12e86423b
Reviewed-on: https://review.whamcloud.com/41219
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
lustre/mdc/mdc_request.c

index c9d99df..3ac4b82 100644 (file)
@@ -2260,6 +2260,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 */