xfs
[Top] [All Lists]

Re: [PATCH 08/14] xfs: convert log grant heads to atomic variables

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 08/14] xfs: convert log grant heads to atomic variables
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 1 Dec 2010 07:59:20 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1290994712-21376-9-git-send-email-david@xxxxxxxxxxxxx>
References: <1290994712-21376-1-git-send-email-david@xxxxxxxxxxxxx> <1290994712-21376-9-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Nov 29, 2010 at 12:38:26PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> Convert the log grant heads to atomic64_t types in preparation for
> converting the accounting algorithms to atomic operations. his patch
> just converts the variables; the algorithmic changes are in a
> separate patch for clarity.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> ---
>  fs/xfs/linux-2.6/xfs_trace.h |   18 +++++++------
>  fs/xfs/xfs_log.c             |   54 +++++++++++++++++++++--------------------
>  fs/xfs/xfs_log_priv.h        |    4 +-
>  fs/xfs/xfs_log_recover.c     |    8 +++---
>  4 files changed, 44 insertions(+), 40 deletions(-)
> 
> diff --git a/fs/xfs/linux-2.6/xfs_trace.h b/fs/xfs/linux-2.6/xfs_trace.h
> index d2cdc85..68c3bdd 100644
> --- a/fs/xfs/linux-2.6/xfs_trace.h
> +++ b/fs/xfs/linux-2.6/xfs_trace.h
> @@ -768,8 +768,8 @@ DECLARE_EVENT_CLASS(xfs_loggrant_class,
>               __field(unsigned int, flags)
>               __field(void *, reserveq)
>               __field(void *, writeq)
> -             __field(xfs_lsn_t, grant_reserve_lsn)
> -             __field(xfs_lsn_t, grant_write_lsn)
> +             __field(xfs_lsn_t, grant_reserve_head)
> +             __field(xfs_lsn_t, grant_write_head)

What about just naming them _head from the beginning?  That would
be a tad cleaner.  Same for the actual variables in the log, even
if they change the type here.

Otherwise looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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