xfs
[Top] [All Lists]

Re: [PATCH 3/6] cleanup maxrecs calculation

To: Christoph Hellwig <hch@xxxxxx>
Subject: Re: [PATCH 3/6] cleanup maxrecs calculation
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 16 Sep 2008 15:36:41 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20080915004648.GD12213@xxxxxx>
Mail-followup-to: Christoph Hellwig <hch@xxxxxx>, xfs@xxxxxxxxxxx
References: <20080915004648.GD12213@xxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Sep 15, 2008 at 02:46:48AM +0200, Christoph Hellwig wrote:
> +     mp->m_alloc_mxr[0] = xfs_allocbt_maxrecs(mp, sbp->sb_blocksize, 1);
> +     mp->m_alloc_mxr[1] = xfs_allocbt_maxrecs(mp, sbp->sb_blocksize, 0);

That's kind of strange - index 0 gets configured with a leaf (?)
value of 1, and index 1 with a value of 0. Can we change the order
of one of these so that the function and the variables match?

Would a define for what the function parameter means make sense?
That way the code would document itself....

> @@ -650,7 +650,8 @@ xfs_iformat_btree(
>        * Copy and convert from the on-disk structure
>        * to the in-memory structure.
>        */
> -     xfs_bmdr_to_bmbt(dfp, XFS_DFORK_SIZE(dip, ip->i_mount, whichfork),
> +     xfs_bmdr_to_bmbt(ip->i_mount, dfp,
> +                      XFS_DFORK_SIZE(dip, ip->i_mount, whichfork),
>               ifp->if_broot, size);

Indenting could do with some fixing there.

Otherwise looks good.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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