summaryrefslogtreecommitdiff
path: root/fs/nfs/nfs4trace.h
diff options
context:
space:
mode:
authorOlga Kornievskaia <kolga@netapp.com>2021-11-04 17:57:12 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2021-11-05 02:43:30 +0300
commit8db744ce45ee31d26bd2776070f31121b009f27e (patch)
tree114271e66143c70616403f0ef114ced4c91d3a25 /fs/nfs/nfs4trace.h
parent2a65ca8b5850914e2ca67a0b8b8140bf7297353a (diff)
downloadlinux-8db744ce45ee31d26bd2776070f31121b009f27e.tar.xz
NFSv4.2 add tracepoint to CB_OFFLOAD
Add a tracepoint to the CB_OFFLOAD operation. Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/nfs4trace.h')
-rw-r--r--fs/nfs/nfs4trace.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index af7e59aa9265..f971e38a6e3a 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -200,6 +200,50 @@ TRACE_EVENT(nfs4_cb_seqid_err,
)
);
+TRACE_EVENT(nfs4_cb_offload,
+ TP_PROTO(
+ const struct nfs_fh *cb_fh,
+ const nfs4_stateid *cb_stateid,
+ uint64_t cb_count,
+ int cb_error,
+ int cb_how_stable
+ ),
+
+ TP_ARGS(cb_fh, cb_stateid, cb_count, cb_error,
+ cb_how_stable),
+
+ TP_STRUCT__entry(
+ __field(unsigned long, error)
+ __field(u32, fhandle)
+ __field(loff_t, cb_count)
+ __field(int, cb_how)
+ __field(int, cb_stateid_seq)
+ __field(u32, cb_stateid_hash)
+ ),
+
+ TP_fast_assign(
+ __entry->error = cb_error < 0 ? -cb_error : 0;
+ __entry->fhandle = nfs_fhandle_hash(cb_fh);
+ __entry->cb_stateid_seq =
+ be32_to_cpu(cb_stateid->seqid);
+ __entry->cb_stateid_hash =
+ nfs_stateid_hash(cb_stateid);
+ __entry->cb_count = cb_count;
+ __entry->cb_how = cb_how_stable;
+ ),
+
+ TP_printk(
+ "error=%ld (%s) fhandle=0x%08x cb_stateid=%d:0x%08x "
+ "cb_count=%llu cb_how=%s",
+ -__entry->error,
+ show_nfs4_status(__entry->error),
+ __entry->fhandle,
+ __entry->cb_stateid_seq, __entry->cb_stateid_hash,
+ __entry->cb_count,
+ show_nfs_stable_how(__entry->cb_how)
+ )
+);
+
#endif /* CONFIG_NFS_V4_1 */
TRACE_EVENT(nfs4_setup_sequence,