gfs2: gfs2_iomap_end tracepoint: log block address
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 15 Mar 2018 14:17:17 +0000 (07:17 -0700)
committerBob Peterson <rpeterso@redhat.com>
Thu, 15 Mar 2018 14:17:17 +0000 (07:17 -0700)
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

index b9318b49ff8f55bb43c5196b7e299a120e7fa9b2..cb10b95efe0f7915ef4770221dca4b6f41a1ac8e 100644 (file)
@@ -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)
 );