xfs
[Top] [All Lists]

Re: [PATCH 05/11] xfs: make i_flags an unsigned long

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 05/11] xfs: make i_flags an unsigned long
From: Ben Myers <bpm@xxxxxxx>
Date: Fri, 13 Jan 2012 13:07:16 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20111208155918.348628833@xxxxxxxxxxxxxxxxxxxxxx>
References: <20111208155755.323930705@xxxxxxxxxxxxxxxxxxxxxx> <20111208155918.348628833@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Thu, Dec 08, 2011 at 10:58:00AM -0500, Christoph Hellwig wrote:
> To be used for bit wakeup i_flags needs to be an unsigned long or we'll
> run into trouble on big endian systems.  Beause of the 1-byte i_update
                                           Because
> field right after it this actually causes a fairly large size increase
> on its own (4 or 8 bytes), but that increase will be more than offset
> by the next two patches.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> Reviewed-by: Alex Elder <aelder@xxxxxxx>
> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

Looks good to me.  But I could go for a thorough explanation of 'trouble
on big endian systems'.

Reviewed-by: Ben Myers <bpm@xxxxxxx>

> 
> ---
>  fs/xfs/xfs_inode.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: xfs/fs/xfs/xfs_inode.h
> ===================================================================
> --- xfs.orig/fs/xfs/xfs_inode.h       2011-11-30 12:58:58.449770178 +0100
> +++ xfs/fs/xfs/xfs_inode.h    2011-11-30 12:59:05.013067955 +0100
> @@ -242,7 +242,7 @@ typedef struct xfs_inode {
>       wait_queue_head_t       i_ipin_wait;    /* inode pinning wait queue */
>       spinlock_t              i_flags_lock;   /* inode i_flags lock */
>       /* Miscellaneous state. */
> -     unsigned short          i_flags;        /* see defined flags below */
> +     unsigned long           i_flags;        /* see defined flags below */
>       unsigned char           i_update_core;  /* timestamps/size is dirty */
>       unsigned int            i_delayed_blks; /* count of delay alloc blks */
>  
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

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