[PATCH 3/4] xfs: convert AIL cursors to use struct list_head
Alex Elder
aelder at sgi.com
Tue Jul 19 18:03:56 CDT 2011
On Mon, 2011-07-18 at 13:40 +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> The list of active AIL cursors uses a roll-your-own linked list with
> special casing for the AIL push cursor. Simplify this code by
> replacing the list with standard struct list_head lists, and use a
> separate list_head to track the active cursors. This allows us to
> treat the AIL push cursor as a generic cursor rather than as a
> special case, further simplifying the code.
>
> Further, fix the duplicate push cursor initialisation that the
> special case handling was hiding, and clean up all the comments
> around the active cursor list handling.
>
> Signed-off-by: Dave Chinner <dchinner at redhat.com>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
You didn't fix one thing I mentioned before in a comment.
I can fix that for you if you like. Other than that, this
looks good.
Reviewed-by: Alex Elder <aelder at sgi.com>
> ---
> fs/xfs/xfs_trans_ail.c | 77 ++++++++++++++++-------------------------------
> fs/xfs/xfs_trans_priv.h | 4 +-
> 2 files changed, 28 insertions(+), 53 deletions(-)
>
> diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
> index 7908c79..8cd329b 100644
> --- a/fs/xfs/xfs_trans_ail.c
> +++ b/fs/xfs/xfs_trans_ail.c
. . .
> @@ -181,17 +177,12 @@ xfs_trans_ail_cursor_init(
. . .
> - * Get the next item in the traversal and advance the cursor.
> - * If the cursor was invalidated (inidicated by a lip of 1),
> - * restart the traversal.
> + * Get the next item in the traversal and advance the cursor. If the cursor
> + * was invalidated (indicated by a lip of 1), restart the traversal.
* was invalidated (indicated by its item pointer's low bit being set),
* restart the traversal.
> */
> struct xfs_log_item *
> xfs_trans_ail_cursor_next(
. . .
More information about the xfs
mailing list