Skip to content

Commit 781a4bf

Browse files
chucklevergregkh
authored andcommitted
NFS: nfs_xdr_status should record the procedure name
[ Upstream commit 5be5945 ] When sunrpc trace points are not enabled, the recorded task ID information alone is not helpful. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent bc65336 commit 781a4bf

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

fs/nfs/nfstrace.h

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,12 @@ TRACE_EVENT(nfs_xdr_status,
11471147
__field(unsigned int, task_id)
11481148
__field(unsigned int, client_id)
11491149
__field(u32, xid)
1150+
__field(int, version)
11501151
__field(unsigned long, error)
1152+
__string(program,
1153+
xdr->rqst->rq_task->tk_client->cl_program->name)
1154+
__string(procedure,
1155+
xdr->rqst->rq_task->tk_msg.rpc_proc->p_name)
11511156
),
11521157

11531158
TP_fast_assign(
@@ -1157,13 +1162,19 @@ TRACE_EVENT(nfs_xdr_status,
11571162
__entry->task_id = task->tk_pid;
11581163
__entry->client_id = task->tk_client->cl_clid;
11591164
__entry->xid = be32_to_cpu(rqstp->rq_xid);
1165+
__entry->version = task->tk_client->cl_vers;
11601166
__entry->error = error;
1167+
__assign_str(program,
1168+
task->tk_client->cl_program->name)
1169+
__assign_str(procedure, task->tk_msg.rpc_proc->p_name)
11611170
),
11621171

11631172
TP_printk(
1164-
"task:%u@%d xid=0x%08x error=%ld (%s)",
1173+
"task:%u@%d xid=0x%08x %sv%d %s error=%ld (%s)",
11651174
__entry->task_id, __entry->client_id, __entry->xid,
1166-
-__entry->error, nfs_show_status(__entry->error)
1175+
__get_str(program), __entry->version,
1176+
__get_str(procedure), -__entry->error,
1177+
nfs_show_status(__entry->error)
11671178
)
11681179
);
11691180

0 commit comments

Comments
 (0)