Re: [PATCH 7/7] nfsd: nfs4xdr decode_stateid helper function

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

 



On Wed, 2008-08-13 at 14:30 -0400, J. Bruce Fields wrote:
> On Wed, Aug 13, 2008 at 01:59:09PM -0400, Trond Myklebust wrote:
> > Which is a good reason for ditching the entire confusing typedef, and
> > replacing it with a packed structure instead:
> > 
> > struct stateid {
> > 	__be32 generation;
> > 	char opaque[12];
> > } __attribute__((packed));
> 
> So without the ((packed)), all arrays get aligned to 8-byte boundaries
> on 64-bit machines?  (What do I need to read to catch up here?)

A quick google showed up:

	http://sig9.com/articles/gcc-packed-structures

In any case, yes, the idea behind the packed attribute is to turn off
the field alignment.

Cheers
  Trond

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux