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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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'.

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.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux