xfs
[Top] [All Lists]

Re: [PATCH 07/15] refactor xfs_btree_readahead

To: Christoph Hellwig <hch@xxxxxx>
Subject: Re: [PATCH 07/15] refactor xfs_btree_readahead
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 25 Jul 2008 09:36:55 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20080723200859.GH7401@xxxxxx>
Mail-followup-to: Christoph Hellwig <hch@xxxxxx>, xfs@xxxxxxxxxxx
References: <20080723200859.GH7401@xxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
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 
> +0200
> +++ 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
> +xfs_btree_reada_corel(

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.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>