summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4trace.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2019-06-19 10:34:09 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-07-09 10:30:25 -0400
commit62a92ba97a31c544802bbf13d3a998e86796d548 (patch)
treeabe58a8ec4901c2ce5d1a02bf8c6bda41fd245cf /fs/nfs/nfs4trace.h
parent7d4006c161ad8cded95f80f43b5fecc36e781497 (diff)
downloadlinux-62a92ba97a31c544802bbf13d3a998e86796d548.tar.gz
linux-62a92ba97a31c544802bbf13d3a998e86796d548.tar.bz2
linux-62a92ba97a31c544802bbf13d3a998e86796d548.zip
NFS: Record task, client ID, and XID in xdr_status trace points
When triggering an nfs_xdr_status trace point, record the task ID and XID of the failing RPC to better pinpoint the problem. This feels like a bit of a layering violation. Suggested-by: Trond Myklebust <trondmy@hammerspace.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/nfs4trace.h')
-rw-r--r--fs/nfs/nfs4trace.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index 9a39fd51c8e7..d85f20945a2b 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -564,24 +564,35 @@ TRACE_EVENT(nfs4_setup_sequence,
TRACE_EVENT(nfs4_xdr_status,
TP_PROTO(
+ const struct xdr_stream *xdr,
u32 op,
int error
),
- TP_ARGS(op, error),
+ TP_ARGS(xdr, op, error),
TP_STRUCT__entry(
+ __field(unsigned int, task_id)
+ __field(unsigned int, client_id)
+ __field(u32, xid)
__field(u32, op)
__field(unsigned long, error)
),
TP_fast_assign(
+ const struct rpc_rqst *rqstp = xdr->rqst;
+ const struct rpc_task *task = rqstp->rq_task;
+
+ __entry->task_id = task->tk_pid;
+ __entry->client_id = task->tk_client->cl_clid;
+ __entry->xid = be32_to_cpu(rqstp->rq_xid);
__entry->op = op;
__entry->error = error;
),
TP_printk(
- "error=%ld (%s) operation %d:",
+ "task:%u@%d xid=0x%08x error=%ld (%s) operation=%u",
+ __entry->task_id, __entry->client_id, __entry->xid,
-__entry->error, show_nfsv4_errors(__entry->error),
__entry->op
)