[OpenAFS-devel] fs sysname assignment problem

Tom Keiser Tom Keiser <tkeiser@gmail.com>
Wed, 22 Jun 2005 00:11:05 -0400


On 6/21/05, John A. Goebel <jgoebel@slac.stanford.edu> wrote:
>=20
> (insert head scratching wonder)
>=20
> The AFS version is 1.3.84 built on an Opteron running
> kernel-smp-devel-2.6.9-5.EL and glibc-2.3.4-2, so is a 64-bit build. My 3=
2-bit
> architecture builds work fine.
>=20
> Any clues on what's going on?
>=20

Yeah.  The way we abstract knowledge of datamodel differences between
userspace and kernelspace in the pioctl and syscall layers needs to be
tweaked a little bit.  I've been working on a patch to fix this for
other reasons.

Right now, most of the datamodel handling is done through
platform-specific ifdefs in afs_call.c and afs_pioctl.c.  Although
that works ok for most things, it starts getting a bit annoying as
certain syscalls and pioctls are complicated enough that they need to
be aware of the datamodel differences.  The end result is we need to
have a lot of preprocessor logic spread about in several difference
places.  My first thought was to roll out two new macros that get
defined in each of the config/param.*.h files, e.g. for sun4x_510:

#if defined(KERNEL)
#if defined(__sparcv9)
#define afs_osi_get_kdatamodel() 64
#define afs_osi_get_udatamodel() ((get_udatamodel() =3D=3D
DATAMODEL_ILP32) ? 32 : 64)
#else /* __sparcv9 */
#define afs_osi_get_kdatamodel() 32
#define afs_osi_get_udatamodel() 32
#endif /* __sparcv9 */
#endif /* KERNEL */

Does this seem like an ok solution to the problem?  Or, does somebody
have a better way?

Regards,

--=20
Tom Keiser
tkeiser@gmail.com