Skip to content

Commit 82476d9

Browse files
chuckleveramschuma-ntap
authored andcommitted
SUNRPC: Trace xprt_timer events
Track RPC timeouts: report the XID and the server address to match the content of network capture. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 9ab6d89 commit 82476d9

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

include/trace/events/sunrpc.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,10 @@ DECLARE_EVENT_CLASS(rpc_xprt_event,
390390
__entry->status)
391391
);
392392

393+
DEFINE_EVENT(rpc_xprt_event, xprt_timer,
394+
TP_PROTO(struct rpc_xprt *xprt, __be32 xid, int status),
395+
TP_ARGS(xprt, xid, status));
396+
393397
DEFINE_EVENT(rpc_xprt_event, xprt_lookup_rqst,
394398
TP_PROTO(struct rpc_xprt *xprt, __be32 xid, int status),
395399
TP_ARGS(xprt, xid, status));

net/sunrpc/xprt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,8 +940,8 @@ static void xprt_timer(struct rpc_task *task)
940940

941941
if (task->tk_status != -ETIMEDOUT)
942942
return;
943-
dprintk("RPC: %5u xprt_timer\n", task->tk_pid);
944943

944+
trace_xprt_timer(xprt, req->rq_xid, task->tk_status);
945945
if (!req->rq_reply_bytes_recvd) {
946946
if (xprt->ops->timer)
947947
xprt->ops->timer(xprt, task);

net/sunrpc/xprtrdma/transport.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,6 @@ xprt_rdma_set_port(struct rpc_xprt *xprt, u16 port)
516516
static void
517517
xprt_rdma_timer(struct rpc_xprt *xprt, struct rpc_task *task)
518518
{
519-
dprintk("RPC: %5u %s: xprt = %p\n", task->tk_pid, __func__, xprt);
520-
521519
xprt_force_disconnect(xprt);
522520
}
523521

0 commit comments

Comments
 (0)