cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 6/9] gfs2: gfs2_iomap_end tracepoint: log block address
Date: Mon,  2 Apr 2018 08:44:51 -0700	[thread overview]
Message-ID: <20180402154454.30079-7-rpeterso@redhat.com> (raw)
In-Reply-To: <20180402154454.30079-1-rpeterso@redhat.com>

From: Andreas Gruenbacher <agruenba@redhat.com>

In the gfs2_iomap_end tracepoint, log the physical block address, just
as in the gfs2_bmap tracepoint.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
 fs/gfs2/trace_gfs2.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h
index b9318b49ff8f..cb10b95efe0f 100644
--- a/fs/gfs2/trace_gfs2.h
+++ b/fs/gfs2/trace_gfs2.h
@@ -515,6 +515,7 @@ TRACE_EVENT(gfs2_iomap_end,
 		__field(	u64,	inum			)
 		__field(	loff_t, offset			)
 		__field(	ssize_t, length			)
+		__field(	sector_t, pblock		)
 		__field(	u16,	flags			)
 		__field(	u16,	type			)
 		__field(	int,	ret			)
@@ -525,16 +526,20 @@ TRACE_EVENT(gfs2_iomap_end,
 		__entry->inum		= ip->i_no_addr;
 		__entry->offset		= iomap->offset;
 		__entry->length		= iomap->length;
+		__entry->pblock		= iomap->addr == IOMAP_NULL_ADDR ? 0 :
+					 (iomap->addr >> ip->i_inode.i_blkbits);
 		__entry->flags		= iomap->flags;
 		__entry->type		= iomap->type;
 		__entry->ret		= ret;
 	),
 
-	TP_printk("%u,%u bmap %llu iomap end %llu/%lu ty:%d flags:%08x rc:%d",
+	TP_printk("%u,%u bmap %llu iomap end %llu/%lu to %llu ty:%d flags:%08x rc:%d",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long long)__entry->inum,
 		  (unsigned long long)__entry->offset,
-		  (unsigned long)__entry->length, (u16)__entry->type,
+		  (unsigned long)__entry->length,
+		  (long long)__entry->pblock,
+		  (u16)__entry->type,
 		  (u16)__entry->flags, __entry->ret)
 );
 
-- 
2.14.3



  parent reply	other threads:[~2018-04-02 15:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-02 15:44 [Cluster-devel] [PATCH 0/9] GFS2: Pre-pull patch posting (merge window) Bob Peterson
2018-04-02 15:44 ` [Cluster-devel] [PATCH 1/9] gfs2: Fix fallocate chunk size Bob Peterson
2018-04-02 15:44 ` [Cluster-devel] [PATCH 2/9] gfs2: Dirty source inode during rename Bob Peterson
2018-04-02 15:44 ` [Cluster-devel] [PATCH 3/9] GFS2: Make function gfs2_remove_from_ail static Bob Peterson
2018-04-02 15:44 ` [Cluster-devel] [PATCH 4/9] GFS2: Only set PageChecked for jdata pages Bob Peterson
2018-04-02 15:44 ` [Cluster-devel] [PATCH 5/9] gfs2: Improve gfs2_block_map comment Bob Peterson
2018-04-02 15:44 ` Bob Peterson [this message]
2018-04-02 15:44 ` [Cluster-devel] [PATCH 7/9] gfs2: Check for the end of metadata in punch_hole Bob Peterson
2018-04-02 15:44 ` [Cluster-devel] [PATCH 8/9] gfs2: Zero out fallocated blocks in fallocate_chunk Bob Peterson
2018-04-02 15:44 ` [Cluster-devel] [PATCH 9/9] gfs2: time journal recovery steps accurately Bob Peterson

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=20180402154454.30079-7-rpeterso@redhat.com \
    --to=rpeterso@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).