Re: block layer sg, bsg

From: Daniel Phillips
Date: Fri Aug 06 2004 - 09:51:42 EST


Hi Dave,

On Wednesday 04 August 2004 23:58, David S. Miller wrote:
> On Wed, 04 Aug 2004 16:51:13 -0700 (PDT)
>
> YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx> wrote:
> > > Well, 32bit ipsec on x86-64/ia64 is a NOP because of that.
> >
> > Hmm, I don't get the point.
> > What part (or which structore) is broken?
>
> On x86-64 and ia64 they have a large issue because the ia32
> emulation layer has to handle the fact that "long long" types
> do not require 8-byte alignment, whereas 64-bit natively
> they do.

I'm making heavy use of struct read/writes in the cluster snapshot block
device, so I need to get this sorted out.

Somewhere I got the idea that if a structure is declared with attribute
PACKED, gcc will generate alignment-independent code (e.g., access each field
byte by byte) on alignment-restricted architectures. So if what I imagine
about gcc is true, what issues remain? These structs have to be declared
packed anyway and with fixed field sizes, or the layout will vary across
architectures.

Regards,

Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/