[PATCH 05/11] xfs: make i_flags an unsigned long
Christoph Hellwig
hch at infradead.org
Tue Jan 24 12:03:37 CST 2012
On Fri, Jan 13, 2012 at 01:07:16PM -0600, Ben Myers wrote:
> 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 at lst.de>
> > Reviewed-by: Alex Elder <aelder at sgi.com>
> > Reviewed-by: Dave Chinner <dchinner at redhat.com>
>
> Looks good to me. But I could go for a thorough explanation of 'trouble
> on big endian systems'.
If we use the bitops that expect to operate on a 64-bit value on a
32-bit value on big endian we'll actually use the 32-bit longword next
to it, not the one we intended for the first half of the bits.
More information about the xfs
mailing list