diff mbox series

[2/3] nfsd: print nf pointer in some nfsd_file tracepoints

Message ID 20220729164715.75702-2-jlayton@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/3] nfsd: add new tracepoint in nfsd_open_break_lease | expand

Commit Message

Jeff Layton July 29, 2022, 4:47 p.m. UTC
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/nfsd/trace.h | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h
index 38fb1ca31010..e9c5d0f56977 100644
--- a/fs/nfsd/trace.h
+++ b/fs/nfsd/trace.h
@@ -803,19 +803,21 @@  TRACE_EVENT(nfsd_file_alloc,
 	),
 	TP_ARGS(nf),
 	TP_STRUCT__entry(
+		__field(const void *, nf)
 		__field(const void *, nf_inode)
 		__field(unsigned long, nf_flags)
 		__field(unsigned long, nf_may)
 		__field(unsigned int, nf_ref)
 	),
 	TP_fast_assign(
+		__entry->nf = nf;
 		__entry->nf_inode = nf->nf_inode;
 		__entry->nf_flags = nf->nf_flags;
 		__entry->nf_ref = refcount_read(&nf->nf_ref);
 		__entry->nf_may = nf->nf_may;
 	),
-	TP_printk("inode=%p ref=%u flags=%s may=%s",
-		__entry->nf_inode, __entry->nf_ref,
+	TP_printk("nf=%p inode=%p ref=%u flags=%s may=%s",
+		__entry->nf, __entry->nf_inode, __entry->nf_ref,
 		show_nf_flags(__entry->nf_flags),
 		show_nfsd_may_flags(__entry->nf_may)
 	)
@@ -834,6 +836,7 @@  TRACE_EVENT(nfsd_file_acquire,
 
 	TP_STRUCT__entry(
 		__field(u32, xid)
+		__field(const void *, nf)
 		__field(const void *, inode)
 		__field(unsigned long, may_flags)
 		__field(unsigned int, nf_ref)
@@ -845,6 +848,7 @@  TRACE_EVENT(nfsd_file_acquire,
 
 	TP_fast_assign(
 		__entry->xid = be32_to_cpu(rqstp->rq_xid);
+		__entry->nf = nf;
 		__entry->inode = inode;
 		__entry->may_flags = may_flags;
 		__entry->nf_ref = nf ? refcount_read(&nf->nf_ref) : 0;
@@ -854,8 +858,8 @@  TRACE_EVENT(nfsd_file_acquire,
 		__entry->status = be32_to_cpu(status);
 	),
 
-	TP_printk("xid=0x%x inode=%p may_flags=%s ref=%u nf_flags=%s nf_may=%s nf_file=%p status=%u",
-			__entry->xid, __entry->inode,
+	TP_printk("xid=0x%x nf=%p inode=%p may_flags=%s ref=%u nf_flags=%s nf_may=%s nf_file=%p status=%u",
+			__entry->xid, __entry->nf, __entry->inode,
 			show_nfsd_may_flags(__entry->may_flags),
 			__entry->nf_ref, show_nf_flags(__entry->nf_flags),
 			show_nfsd_may_flags(__entry->nf_may),
@@ -873,6 +877,7 @@  TRACE_EVENT(nfsd_file_create,
 	TP_ARGS(rqstp, may_flags, nf),
 
 	TP_STRUCT__entry(
+		__field(const void *, nf)
 		__field(const void *, nf_inode)
 		__field(const void *, nf_file)
 		__field(unsigned long, may_flags)
@@ -883,6 +888,7 @@  TRACE_EVENT(nfsd_file_create,
 	),
 
 	TP_fast_assign(
+		__entry->nf = nf;
 		__entry->nf_inode = nf->nf_inode;
 		__entry->nf_file = nf->nf_file;
 		__entry->may_flags = may_flags;
@@ -892,8 +898,8 @@  TRACE_EVENT(nfsd_file_create,
 		__entry->xid = be32_to_cpu(rqstp->rq_xid);
 	),
 
-	TP_printk("xid=0x%x inode=%p may_flags=%s ref=%u nf_flags=%s nf_may=%s nf_file=%p",
-		__entry->xid, __entry->nf_inode,
+	TP_printk("xid=0x%x nf=%p inode=%p may_flags=%s ref=%u nf_flags=%s nf_may=%s nf_file=%p",
+		__entry->xid, __entry->nf, __entry->nf_inode,
 		show_nfsd_may_flags(__entry->may_flags),
 		__entry->nf_ref, show_nf_flags(__entry->nf_flags),
 		show_nfsd_may_flags(__entry->nf_may), __entry->nf_file
@@ -1060,19 +1066,21 @@  DECLARE_EVENT_CLASS(nfsd_file_gc_class,
 	),
 	TP_ARGS(nf),
 	TP_STRUCT__entry(
-		__field(void *, nf_inode)
-		__field(void *, nf_file)
+		__field(const void *, nf)
+		__field(const void *, nf_inode)
+		__field(const void *, nf_file)
 		__field(int, nf_ref)
 		__field(unsigned long, nf_flags)
 	),
 	TP_fast_assign(
+		__entry->nf = nf;
 		__entry->nf_inode = nf->nf_inode;
 		__entry->nf_file = nf->nf_file;
 		__entry->nf_ref = refcount_read(&nf->nf_ref);
 		__entry->nf_flags = nf->nf_flags;
 	),
-	TP_printk("inode=%p ref=%d nf_flags=%s nf_file=%p",
-		__entry->nf_inode, __entry->nf_ref,
+	TP_printk("nf=%p inode=%p ref=%d nf_flags=%s nf_file=%p",
+		__entry->nf, __entry->nf_inode, __entry->nf_ref,
 		show_nf_flags(__entry->nf_flags),
 		__entry->nf_file
 	)