[LU-12333] Add additional rpc flags to DEBUG_REQ_FLAGS Created: 23/May/19  Updated: 20/Jun/19  Resolved: 20/Jun/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.13.0
Fix Version/s: Lustre 2.13.0

Type: Improvement Priority: Minor
Reporter: Chris Horn Assignee: Chris Horn
Resolution: Fixed Votes: 0
Labels: None

Rank (Obsolete): 9223372036854775807

 Description   

The PtlRPC state machine relies on flags in the ptlrpc_request structure to transition from one request state to another. When a request is in the RQ_PHASE_UNREG_RPC state there are three flags relevant to the request's ability to transition.

From ptlrpc_check_set():

                        if (req->rq_phase == RQ_PHASE_UNREG_RPC &&
                            ptlrpc_client_recv_or_unlink(req))
                                continue;

and from ptlrpc_client_recv_or_unlink():

        rc = !req->rq_req_unlinked || !req->rq_reply_unlinked ||
             req->rq_receiving_reply;

None of those three flags are printed by the DEBUG_REQ_FLAGS macro. Historically this has made it a little more difficult to troubleshoot bugs resulting in RPCs that are stuck in the unregistering state. Those flags should be added to the macro.



 Comments   
Comment by Gerrit Updater [ 23/May/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/34949
Subject: LU-12333 ptlrpc: Add more flags to DEBUG_REQ_FLAGS macro
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 69bf6225d11745051a88f854d94a4add3f6ccb0f

Comment by Andreas Dilger [ 23/May/19 ]

I was just thinking yesterday that it would be useful to also include the OBD device name or target name into the main client D_RPCTRACE debug messages ("Sending RPC pname:..." and ""Completed RPC pname:...") in addition to the server NID. Otherwise, in a client debug log with a large number of threads doing RPCs to servers with multiple OSTs/MDTs it is more difficult to track which target the client is accessing.

Comment by Gerrit Updater [ 01/Jun/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34949/
Subject: LU-12333 ptlrpc: Add more flags to DEBUG_REQ_FLAGS macro
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5bcc3a330e21865b5b78a4c4596f878f12a43dbc

Comment by Peter Jones [ 01/Jun/19 ]

Landed for 2.13

Comment by Gerrit Updater [ 06/Jun/19 ]

Vitaly Fertman (c17818@cray.com) uploaded a new patch: https://review.whamcloud.com/35090
Subject: LU-12333 ptlrpc: Add more flags to DEBUG_REQ_FLAGS macro
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 56ff009c3af13deb4d249f519f7c62b8491f158b

Comment by Gerrit Updater [ 20/Jun/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35090/
Subject: LU-12333 ptlrpc: Add more flags to DEBUG_REQ_FLAGS macro
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 3e43d06810e69fdccd815bbbf5e4b50930d33ee7

Generated at Sat Feb 10 02:51:39 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.