xfs
[Top] [All Lists]

Re: [PATCH 3/4] xfs: refactor xlog_recover_commit_trans

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 3/4] xfs: refactor xlog_recover_commit_trans
From: Alex Elder <aelder@xxxxxxx>
Date: Thu, 16 Dec 2010 15:18:15 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20101201220710.454838485@xxxxxxxxxxxxxxxxxxxxxx>
References: <20101201220620.340188389@xxxxxxxxxxxxxxxxxxxxxx> <20101201220710.454838485@xxxxxxxxxxxxxxxxxxxxxx>
Reply-to: aelder@xxxxxxx
On Wed, 2010-12-01 at 17:06 -0500, Christoph Hellwig wrote:
> 
> Merge the call to xlog_recover_reorder_trans and the loop over the
> recovery items from xlog_recover_do_trans into xlog_recover_commit_trans,
> and keep the switch statement over the log item types as a separate helper.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> 

I'm making a small change to this one patch though...

. . .
> @@ -2757,17 +2699,65 @@ xlog_recover_free_trans(
>  }
>  
>  STATIC int
> +xlog_recover_commit_item(
> +     struct log              *log,
> +     struct xlog_recover     *trans,
> +     xlog_recover_item_t     *item,
> +     int                     pass)
> +{
> +     trace_xfs_log_recover_item_recover(log, trans, item, pass);
> +
> +     switch (ITEM_TYPE(item)) {
> +     case XFS_LI_BUF:
> +             return xlog_recover_do_buffer_trans(log, item, pass);
> +             break;

I have deleted this "break" statement.

> +     case XFS_LI_INODE:
> +             return xlog_recover_do_inode_trans(log, item, pass);
> +     case XFS_LI_EFI:
> +             return xlog_recover_do_efi_trans(log, item, trans->r_lsn, pass);
> +     case XFS_LI_EFD:
> +             xlog_recover_do_efd_trans(log, item, pass);
> +             return 0;
. . .

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