xfs
[Top] [All Lists]

Re: [PATCH 3/7] sanitize xlog_in_core_t definition

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 3/7] sanitize xlog_in_core_t definition
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 28 Oct 2008 16:17:34 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20081027133907.GD1109@xxxxxxxxxxxxx>
Mail-followup-to: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
References: <20081027133907.GD1109@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Oct 27, 2008 at 09:39:07AM -0400, Christoph Hellwig wrote:
> Move all fields from xlog_iclog_fields_t into xlog_in_core_t instead of having
> them in a substructure and the using #defines to make it look like they were
> directly in xlog_in_core_t.  Also document that xlog_in_core_2_t is grossly
> misnamed, and make all references to it typesafe.
> 
> (First sent on Semptember 15th)

Couple of things.

> @@ -361,41 +371,11 @@ typedef struct xlog_iclog_fields {
>  
>       /* reference counts need their own cacheline */
>       atomic_t                ic_refcnt ____cacheline_aligned_in_smp;
> -} xlog_iclog_fields_t;
> -
> -typedef union xlog_in_core2 {
> -     xlog_rec_header_t       hic_header;
> -     xlog_rec_ext_header_t   hic_xheader;
> -     char                    hic_sector[XLOG_HEADER_SIZE];
> -} xlog_in_core_2_t;
> -
> -typedef struct xlog_in_core {
> -     xlog_iclog_fields_t     hic_fields;
> -     xlog_in_core_2_t        *hic_data;
> +     xlog_in_core_2_t        *ic_data;
> +#define ic_header    ic_data->hic_header
>  } xlog_in_core_t;

The ic_data pointer should not be on the same cacheline as the
reference count seeing as it is read-only field.

Otherwise seems ok.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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