On Friday 17 October 2008 02:59, OGAWA Hirofumi wrote:
> Daniel Phillips <[EMAIL PROTECTED]> writes:
>
> >> -struct ileaf { u16 magic, count; inum_t ibase; char table[]; };
> >> +struct ileaf { u16 magic, count; u32 pad; inum_t ibase; char table[]; };
> >>
> >> /*
> >> * inode leaf format
> >
> > Good catch. A better way to fix this is using gcc attribute packed,
> > which is done by the Tux3 macro PACKED:
>
> But, I think the result of it is aliment fault on some archs.
Do you have an example of that? I was discussing this point with Chris
Mason a week or two ago and he didn't know of any arch where it didn't
work.
> > struct ileaf { u16 magic, count; inum_t ibase; char table[]; } PACKED;
> >
> > We need to check all structs used for on-disk layout and make sure they
> > are all declared packed.
>
> I checked those by pahole. Looks good.
Thanks!
Regards,
Daniel
_______________________________________________
Tux3 mailing list
[email protected]
http://tux3.org/cgi-bin/mailman/listinfo/tux3