[PATCH 8/9] xfs: use AIL bulk update function to implement single updates
Christoph Hellwig
hch at infradead.org
Fri Dec 17 08:15:56 CST 2010
On Mon, Dec 13, 2010 at 03:32:22PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> 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 at lst.de>
> + 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.
More information about the xfs
mailing list