Whamcloud - gitweb
LU-15401 fld: don't obtain a slot for fld request 56/45956/2
authorAndriy Skulysh <c17819@cray.com>
Wed, 10 Nov 2021 20:22:06 +0000 (22:22 +0200)
committerOleg Drokin <green@whamcloud.com>
Thu, 20 Jan 2022 18:25:15 +0000 (18:25 +0000)
fld_client_rpc() is called with ldlm_lock held.
Thus it can cause deadlock on obtainig request slot:

 #0 [ffff92c9d63df568] __schedule
 #1 [ffff92c9d63df5f0] schedule
 #2 [ffff92c9d63df600] obd_get_request_slot
 #3 [ffff92c9d63df6b0] fld_client_rpc
 #4 [ffff92c9d63df700] fld_client_lookup
 #5 [ffff92c9d63df780] lmv_fld_lookup
 #6 [ffff92c9d63df7b8] lmv_unpackmd
 #7 [ffff92c9d63df810] mdc_get_lustre_md
 #8 [ffff92c9d63df850] lmv_get_lustre_md
 #9 [ffff92c9d63df888] ll_prep_inode

Request slot can be ommited for fld reuest as they
are sent to separate FLD_REQUEST_PORTAL portal.

Change-Id: I12987ca2e4aa0d70aa760e3a1ac20fe1a91d64b5
HPE-bug-id: LUS-10576
Signed-off-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Vitaly Fertman <c17818@cray.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-on: https://review.whamcloud.com/45956
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/fld/fld_request.c

index 3be93c2..e381eb8 100644 (file)
@@ -389,9 +389,7 @@ again:
                rc = -EAGAIN;
                req->rq_status = rc;
        } else {
                rc = -EAGAIN;
                req->rq_status = rc;
        } else {
-               obd_get_request_slot(&exp->exp_obd->u.cli);
                rc = ptlrpc_queue_wait(req);
                rc = ptlrpc_queue_wait(req);
-               obd_put_request_slot(&exp->exp_obd->u.cli);
        }
 
        if (rc == -ENOENT) {
        }
 
        if (rc == -ENOENT) {