Bug#554120: aufs2 in Debian
Okajima-san,
We are including aufs2 in the Debian kernel for use on live CDs. We are trying to build it for all Debian architectures, but found the following error on alpha: CC [M] fs/aufs/vdir.o /build/buildd-linux-2.6_2.6.31-1-alpha-87a0KU/linux-2.6-2.6.31/debian/build/source_alpha_none/fs/aufs/vdir.c: In function 'calc_size': /build/buildd-linux-2.6_2.6.31-1-alpha-87a0KU/linux-2.6-2.6.31/debian/build/source_alpha_none/fs/aufs/vdir.c:28: error: size of array 'type name' is negative The code says: BUILD_BUG_ON(sizeof(ino_t) != sizeof(long)); return ALIGN(sizeof(struct au_vdir_de) + nlen, sizeof(ino_t)); but on alpha, sizeof(ino_t) == 4 but sizeof(long) == 8. Is it really necessary that these types have the same size? I can't see why it would be necessary for the directory entries to be long-aligned. If it is, perhaps we could use: BUILD_BUG_ON(sizeof(ino_t) > sizeof(long)); return ALIGN(sizeof(struct au_vdir_de) + nlen, sizeof(long)); Ben. -- Ben Hutchings The generation of random numbers is too important to be left to chance. - Robert Coveyou |
Bug#554120: aufs2 in Debian
Hello Ben,
Ben Hutchings: > The code says: > > BUILD_BUG_ON(sizeof(ino_t) !=3D sizeof(long)); > return ALIGN(sizeof(struct au_vdir_de) + nlen, sizeof(ino_t)); > > but on alpha, sizeof(ino_t) =3D=3D 4 but sizeof(long) =3D=3D 8. > > Is it really necessary that these types have the same size? I can't see > why it would be necessary for the directory entries to be long-aligned. ::: It supposed to align the structure on memory, 8-byte alignment. On some systems, accesses to incorrectly aligned member has to pay the penalty which is a short-time delay. As you wrote, the code is wrong. I had made CONFIG_AUFS_INO_T_64 to support ino_t on alpha system. Currently it is used by export.c only. This problem was born when I switched aufs2 from aufs1. I will fix it and release on next Monday. Thank you for reporting. J. R. Okajima -- To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
Bug#554120: aufs2 in Debian
> Ben Hutchings:
> > The code says: > > > > BUILD_BUG_ON(sizeof(ino_t) !=3D sizeof(long)); > > return ALIGN(sizeof(struct au_vdir_de) + nlen, sizeof(ino_t)); > > > > but on alpha, sizeof(ino_t) =3D=3D 4 but sizeof(long) =3D=3D 8. I decided to remove the BUILD_BUG_ON() line simply. If you want to test early, then try removing. J. R. Okajima -- To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
| All times are GMT. The time now is 01:08 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.