xfs
[Top] [All Lists]

Re: [PATCH 8/9] xfs: use AIL bulk update function to implement single up

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 8/9] xfs: use AIL bulk update function to implement single updates
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 20 Dec 2010 12:06:43 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20101217141556.GA30830@xxxxxxxxxxxxx>
References: <1292214743-18073-1-git-send-email-david@xxxxxxxxxxxxx> <1292214743-18073-9-git-send-email-david@xxxxxxxxxxxxx> <20101217141556.GA30830@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Fri, Dec 17, 2010 at 09:15:56AM -0500, Christoph Hellwig wrote:
> On Mon, Dec 13, 2010 at 03:32:22PM +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > We now have two copies of AIL insert operations that are mostly
> > duplicate functionality. The single log item updates can be
> > implemented via the bulk updates by turning xfs_trans_ail_update()
> > into a simple wrapper. This removes all the duplicate insert
> > functionality and associated helpers.
> 
> 
> Looks good,
> 
> 
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> 
> > +   struct xfs_ail  *ailp,
> > +static inline void
> > +xfs_trans_ail_update(
> > +   xfs_log_item_t  *lip,
> > +   xfs_lsn_t       lsn) __releases(ailp->xa_lock)
> > +{
> > +   struct xfs_log_item     *log_items[1] = { lip, };
> > +
> > +   xfs_trans_ail_update_bulk(ailp, log_items, 1, lsn);
> 
> This could be simplified down to:
> 
>       xfs_trans_ail_update_bulk(ailp, &lip, 1, lsn);
> 
> at which point it could even become a macro.

Yup, good point. Done.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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