xfs: remove the if_ext_max field in struct xfs_ifork
authorChristoph Hellwig <hch@infradead.org>
Sun, 18 Dec 2011 20:00:07 +0000 (20:00 +0000)
committerBen Myers <bpm@sgi.com>
Tue, 17 Jan 2012 21:02:28 +0000 (15:02 -0600)
commit8096b1ebb59b94b3bc6abb6b7d121419e83447ba
tree3d01d19459cbb973dc8698b7fa44e1bee260303d
parent3d2b3129c2c48cf0153e0f2058cf87e4b45ca3ac
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>
fs/xfs/xfs_attr_leaf.c
fs/xfs/xfs_bmap.c
fs/xfs/xfs_dfrag.c
fs/xfs/xfs_iget.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_trace.h