public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: trondmy@kernel.org
To: linux-nfs@vger.kernel.org
Subject: [PATCH 2/3] NFS: Improve O_DIRECT tracing
Date: Tue,  9 Aug 2022 14:13:16 -0400	[thread overview]
Message-ID: <20220809181317.20348-2-trondmy@kernel.org> (raw)
In-Reply-To: <20220809181317.20348-1-trondmy@kernel.org>

From: Trond Myklebust <trond.myklebust@hammerspace.com>

Switch the formatting to match the other NFS tracepoints.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 fs/nfs/nfstrace.h | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h
index 731eecfdf49a..8e87cf8e5e78 100644
--- a/fs/nfs/nfstrace.h
+++ b/fs/nfs/nfstrace.h
@@ -1597,12 +1597,10 @@ DECLARE_EVENT_CLASS(nfs_direct_req_class,
 		TP_ARGS(dreq),
 
 		TP_STRUCT__entry(
-			__field(const struct nfs_direct_req *, dreq)
 			__field(dev_t, dev)
 			__field(u64, fileid)
 			__field(u32, fhandle)
-			__field(int, ref)
-			__field(loff_t, io_start)
+			__field(loff_t, offset)
 			__field(ssize_t, count)
 			__field(ssize_t, bytes_left)
 			__field(ssize_t, error)
@@ -1614,12 +1612,10 @@ DECLARE_EVENT_CLASS(nfs_direct_req_class,
 			const struct nfs_inode *nfsi = NFS_I(inode);
 			const struct nfs_fh *fh = &nfsi->fh;
 
-			__entry->dreq = dreq;
 			__entry->dev = inode->i_sb->s_dev;
 			__entry->fileid = nfsi->fileid;
 			__entry->fhandle = nfs_fhandle_hash(fh);
-			__entry->ref = kref_read(&dreq->kref);
-			__entry->io_start = dreq->io_start;
+			__entry->offset = dreq->io_start;
 			__entry->count = dreq->count;
 			__entry->bytes_left = dreq->bytes_left;
 			__entry->error = dreq->error;
@@ -1627,13 +1623,14 @@ DECLARE_EVENT_CLASS(nfs_direct_req_class,
 		),
 
 		TP_printk(
-			"dreq=%p fileid=%02x:%02x:%llu fhandle=0x%08x ref=%d "
-			"io_start=%lld count=%zd bytes_left=%zd error=%zd flags=%s",
-			__entry->dreq, MAJOR(__entry->dev), MINOR(__entry->dev),
+			"error=%zd fileid=%02x:%02x:%llu fhandle=0x%08x "
+			"offset=%lld count=%zd bytes_left=%zd flags=%s",
+			__entry->error, MAJOR(__entry->dev),
+			MINOR(__entry->dev),
 			(unsigned long long)__entry->fileid,
-			__entry->fhandle, __entry->ref,
-			__entry->io_start, __entry->count, __entry->bytes_left,
-			__entry->error, nfs_show_direct_req_flags(__entry->flags)
+			__entry->fhandle, __entry->offset,
+			__entry->count, __entry->bytes_left,
+			nfs_show_direct_req_flags(__entry->flags)
 		)
 );
 
-- 
2.37.1


  reply	other threads:[~2022-08-09 18:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 18:13 [PATCH 1/3] NFS: Improve write error tracing trondmy
2022-08-09 18:13 ` trondmy [this message]
2022-08-09 18:13   ` [PATCH 3/3] NFS: Improve readpage/writepage tracing trondmy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220809181317.20348-2-trondmy@kernel.org \
    --to=trondmy@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox