xfs
[Top] [All Lists]

Re: [PATCH 2/7] xfs: remove xfs_buf_get / xfs_buf_read

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/7] xfs: remove xfs_buf_get / xfs_buf_read
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 16 Nov 2009 14:15:12 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20091114161801.411213050@xxxxxxxxxxxxxxxxxxxxxx>
References: <20091114161717.233372584@xxxxxxxxxxxxxxxxxxxxxx> <20091114161801.411213050@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Sat, Nov 14, 2009 at 11:17:19AM -0500, Christoph Hellwig wrote:
> The two interfaces are highl confusing as they do have a flags argument
> which gets ignored and replaced with default flags.  Switch the few remaining
> callers to use xfs_buf_get_flags and xfs_buf_read_flags instead and remove
> these wrappers.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Personally I would have dropped the *_flags from the function names
as well (so everything calls xfs_buf_get() or xfs_buf_read()) but
it doesn't really matter....

>               /*
>                * BNO btree root block
>                */
> -             bp = xfs_buf_get(mp->m_ddev_targp,
> -                     XFS_AGB_TO_DADDR(mp, agno, XFS_BNO_BLOCK(mp)),
> -                     BTOBB(mp->m_sb.sb_blocksize), 0);
> +             bp = xfs_buf_get_flags(mp->m_ddev_targp,
> +                             XFS_AGB_TO_DADDR(mp, agno, XFS_BNO_BLOCK(mp)),
> +                             BTOBB(mp->m_sb.sb_blocksize), XBF_LOCK | 
> XBF_MAPPED);

That looks wider than 80 columns. Same for the other conversions,
too.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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