[PATCH 4/8] xfs: add log item recovery tracing

Christoph Hellwig hch at infradead.org
Sat Apr 3 04:36:38 CDT 2010


On Thu, Apr 01, 2010 at 11:41:27PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
> 
> Currently there is no tracing in log recovery, so it is difficult to
> determine what is going on when something goes wrong.
> 
> Add tracing for log item recovery to provide visibility into the log
> recovery process. The tracing added shows regions being extracted
> from the log transactions and added to the transaction hash forming
> recovery items, followed by the reordering, cancelling and finally
> recovery of the items.
> 
> Signed-off-by: Dave Chinner <dchinner at redhat.com>
> ---
>  fs/xfs/linux-2.6/xfs_trace.c |    3 +
>  fs/xfs/linux-2.6/xfs_trace.h |  147 ++++++++++++++++++++++++++++++++++++++++++
>  fs/xfs/xfs_buf_item.h        |    2 +-
>  fs/xfs/xfs_log_recover.c     |   44 ++++++++++--
>  4 files changed, 187 insertions(+), 9 deletions(-)
> 

> +#define XFS_LOG_ITEM_TYPE \
> +	{ 0x1236,	"XFS_LI_EFI" }, \
> +	{ 0x1237,	"XFS_LI_EFD" }, \
> +	{ 0x1238,	"XFS_LI_IUNLINK" }, \
> +	{ 0x123b,	"XFS_LI_INODE" }, \
> +	{ 0x123c,	"XFS_LI_BUF" }, \
> +	{ 0x123d,	"XFS_LI_DQUOT" }, \
> +	{ 0x123e,	"XFS_LI_QUOTAOFF" }

For the other trace events I kept these close to the defintion
of these flags.  Is there a good reason you use the numerical
and not hte symbolic names on the left side?

The rest of the patch looks good to me.




More information about the xfs mailing list