On Wed, Jul 23, 2008 at 10:08:59PM +0200, Christoph Hellwig wrote:
> From: Dave Chinner <dgc@xxxxxxx>
Can i review my own code? ;)
> Refactor xfs_btree_readahead to make it more readable:
> (a) remove the inline xfs_btree_readahead wrapper and move all checks out
> of line into the main routine.
> (b) factor out helpers for short/long form btrees
> (c) move check for root in inodes from the callers into xfs_btree_readahead
> [hch: split out from a big patch and minor cleanups]
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> Index: linux-2.6-xfs/fs/xfs/xfs_btree.c
> --- linux-2.6-xfs.orig/fs/xfs/xfs_btree.c 2008-07-11 11:13:15.000000000
> +++ linux-2.6-xfs/fs/xfs/xfs_btree.c 2008-07-11 11:13:20.000000000 +0200
> @@ -709,66 +709,84 @@ xfs_btree_reada_bufs(
> xfs_baread(mp->m_ddev_targp, d, mp->m_bsize * count);
> +STATIC int
I've been wondering if this is the best naming convention -
appending a single s or l to indicate short or long btree ops.
Perhaps this would be better as xfs_btree_readahead_short() and
xfs_btree_readahead_long(), esp. as we dropped the 'core' from
the caller to make it xfs_btree_readahead().
Otherwise it looks good.