aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trace.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-12-18 15:00:07 -0500
committerBen Myers <bpm@sgi.com>2012-01-17 16:02:28 -0500
commit8096b1ebb59b94b3bc6abb6b7d121419e83447ba (patch)
tree3d01d19459cbb973dc8698b7fa44e1bee260303d /fs/xfs/xfs_trace.h
parent3d2b3129c2c48cf0153e0f2058cf87e4b45ca3ac (diff)
xfs: remove the if_ext_max field in struct xfs_ifork
We spent a lot of effort to maintain this field, but it always equals to the fork size divided by the constant size of an extent. The prime use of it is to assert that the two stay in sync. Just divide the fork size by the extent size in the few places that we actually use it and remove the overhead of maintaining it. Also introduce a few helpers to consolidate the places where we actually care about the value. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trace.h')
-rw-r--r--fs/xfs/xfs_trace.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 297f9fa6fb64..81efa0416173 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -1568,7 +1568,6 @@ DECLARE_EVENT_CLASS(xfs_swap_extent_class,
1568 __field(xfs_ino_t, ino) 1568 __field(xfs_ino_t, ino)
1569 __field(int, format) 1569 __field(int, format)
1570 __field(int, nex) 1570 __field(int, nex)
1571 __field(int, max_nex)
1572 __field(int, broot_size) 1571 __field(int, broot_size)
1573 __field(int, fork_off) 1572 __field(int, fork_off)
1574 ), 1573 ),
@@ -1578,18 +1577,16 @@ DECLARE_EVENT_CLASS(xfs_swap_extent_class,
1578 __entry->ino = ip->i_ino; 1577 __entry->ino = ip->i_ino;
1579 __entry->format = ip->i_d.di_format; 1578 __entry->format = ip->i_d.di_format;
1580 __entry->nex = ip->i_d.di_nextents; 1579 __entry->nex = ip->i_d.di_nextents;
1581 __entry->max_nex = ip->i_df.if_ext_max;
1582 __entry->broot_size = ip->i_df.if_broot_bytes; 1580 __entry->broot_size = ip->i_df.if_broot_bytes;
1583 __entry->fork_off = XFS_IFORK_BOFF(ip); 1581 __entry->fork_off = XFS_IFORK_BOFF(ip);
1584 ), 1582 ),
1585 TP_printk("dev %d:%d ino 0x%llx (%s), %s format, num_extents %d, " 1583 TP_printk("dev %d:%d ino 0x%llx (%s), %s format, num_extents %d, "
1586 "Max in-fork extents %d, broot size %d, fork offset %d", 1584 "broot size %d, fork offset %d",
1587 MAJOR(__entry->dev), MINOR(__entry->dev), 1585 MAJOR(__entry->dev), MINOR(__entry->dev),
1588 __entry->ino, 1586 __entry->ino,
1589 __print_symbolic(__entry->which, XFS_SWAPEXT_INODES), 1587 __print_symbolic(__entry->which, XFS_SWAPEXT_INODES),
1590 __print_symbolic(__entry->format, XFS_INODE_FORMAT_STR), 1588 __print_symbolic(__entry->format, XFS_INODE_FORMAT_STR),
1591 __entry->nex, 1589 __entry->nex,
1592 __entry->max_nex,
1593 __entry->broot_size, 1590 __entry->broot_size,
1594 __entry->fork_off) 1591 __entry->fork_off)
1595) 1592)