aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/trace_gfs2.h
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2012-05-09 12:11:35 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2012-05-11 05:31:34 -0400
commit41db1ab9bed189cb904f7b0e145c3c6030c094c6 (patch)
tree6e7180fc7380d1c3b0c2d288c2f513f973e47f8e /fs/gfs2/trace_gfs2.h
parentf2f9c8124482fa2e189d0ee321aac7a2cc76a57a (diff)
GFS2: Add rgrp information to block_alloc trace point
This is a second attempt at a patch that adds rgrp information to the block allocation trace point for GFS2. As suggested, the patch was modified to list the rgrp information _after_ the fields that exist today. Again, the reason for this patch is to allow us to trace and debug problems with the block reservations patch, which is still in the works. We can debug problems with reservations if we can see what block allocations result from the block reservations. It may also be handy in figuring out if there are problems in rgrp free space accounting. In other words, we can use it to track the rgrp and its free space along side the allocations that are taking place. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/trace_gfs2.h')
-rw-r--r--fs/gfs2/trace_gfs2.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h
index dfa89cd75534..1b8b81588199 100644
--- a/fs/gfs2/trace_gfs2.h
+++ b/fs/gfs2/trace_gfs2.h
@@ -457,10 +457,10 @@ TRACE_EVENT(gfs2_bmap,
457/* Keep track of blocks as they are allocated/freed */ 457/* Keep track of blocks as they are allocated/freed */
458TRACE_EVENT(gfs2_block_alloc, 458TRACE_EVENT(gfs2_block_alloc,
459 459
460 TP_PROTO(const struct gfs2_inode *ip, u64 block, unsigned len, 460 TP_PROTO(const struct gfs2_inode *ip, struct gfs2_rgrpd *rgd,
461 u8 block_state), 461 u64 block, unsigned len, u8 block_state),
462 462
463 TP_ARGS(ip, block, len, block_state), 463 TP_ARGS(ip, rgd, block, len, block_state),
464 464
465 TP_STRUCT__entry( 465 TP_STRUCT__entry(
466 __field( dev_t, dev ) 466 __field( dev_t, dev )
@@ -468,6 +468,8 @@ TRACE_EVENT(gfs2_block_alloc,
468 __field( u64, inum ) 468 __field( u64, inum )
469 __field( u32, len ) 469 __field( u32, len )
470 __field( u8, block_state ) 470 __field( u8, block_state )
471 __field( u64, rd_addr )
472 __field( u32, rd_free_clone )
471 ), 473 ),
472 474
473 TP_fast_assign( 475 TP_fast_assign(
@@ -476,14 +478,18 @@ TRACE_EVENT(gfs2_block_alloc,
476 __entry->inum = ip->i_no_addr; 478 __entry->inum = ip->i_no_addr;
477 __entry->len = len; 479 __entry->len = len;
478 __entry->block_state = block_state; 480 __entry->block_state = block_state;
481 __entry->rd_addr = rgd->rd_addr;
482 __entry->rd_free_clone = rgd->rd_free_clone;
479 ), 483 ),
480 484
481 TP_printk("%u,%u bmap %llu alloc %llu/%lu %s", 485 TP_printk("%u,%u bmap %llu alloc %llu/%lu %s rg:%llu rf:%u",
482 MAJOR(__entry->dev), MINOR(__entry->dev), 486 MAJOR(__entry->dev), MINOR(__entry->dev),
483 (unsigned long long)__entry->inum, 487 (unsigned long long)__entry->inum,
484 (unsigned long long)__entry->start, 488 (unsigned long long)__entry->start,
485 (unsigned long)__entry->len, 489 (unsigned long)__entry->len,
486 block_state_name(__entry->block_state)) 490 block_state_name(__entry->block_state),
491 (unsigned long long)__entry->rd_addr,
492 __entry->rd_free_clone)
487); 493);
488 494
489#endif /* _TRACE_GFS2_H */ 495#endif /* _TRACE_GFS2_H */