summaryrefslogtreecommitdiff
path: root/fs/nfs/nfs4trace.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2019-06-19 17:33:47 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-07-09 17:30:25 +0300
commitc5833f0dc4cef778a718ad7d00df38e199045997 (patch)
treeac04d52928e62d50bce060a50136d81c70009063 /fs/nfs/nfs4trace.h
parent675dd90ad0932f2c03912a5252458d792bd7033a (diff)
downloadlinux-c5833f0dc4cef778a718ad7d00df38e199045997.tar.xz
NFS4: Add a trace event to record invalid CB sequence IDs
Help debug NFSv4 callback failures. 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.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index cd1a5c08da9a..6beb1f29134b 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -490,6 +490,44 @@ TRACE_EVENT(nfs4_cb_sequence,
__entry->highest_slotid
)
);
+
+TRACE_EVENT(nfs4_cb_seqid_err,
+ TP_PROTO(
+ const struct cb_sequenceargs *args,
+ __be32 status
+ ),
+ TP_ARGS(args, status),
+
+ TP_STRUCT__entry(
+ __field(unsigned int, session)
+ __field(unsigned int, slot_nr)
+ __field(unsigned int, seq_nr)
+ __field(unsigned int, highest_slotid)
+ __field(unsigned int, cachethis)
+ __field(int, error)
+ ),
+
+ TP_fast_assign(
+ __entry->session = nfs_session_id_hash(&args->csa_sessionid);
+ __entry->slot_nr = args->csa_slotid;
+ __entry->seq_nr = args->csa_sequenceid;
+ __entry->highest_slotid = args->csa_highestslotid;
+ __entry->cachethis = args->csa_cachethis;
+ __entry->error = -be32_to_cpu(status);
+ ),
+
+ TP_printk(
+ "error=%d (%s) session=0x%08x slot_nr=%u seq_nr=%u "
+ "highest_slotid=%u",
+ __entry->error,
+ show_nfsv4_errors(__entry->error),
+ __entry->session,
+ __entry->slot_nr,
+ __entry->seq_nr,
+ __entry->highest_slotid
+ )
+);
+
#endif /* CONFIG_NFS_V4_1 */
TRACE_EVENT(nfs4_setup_sequence,