Coda File System

Re: Coda client, 32-bit userland on a 64-bit kernel?

From: Greg Troxel <>
Date: Tue, 10 Jul 2007 20:27:23 -0400
  Nobody possibly felt that the problem is worth to solve.  Note that
  there is a rationale behind the tries to combine the architectures.

I think you're being a bit unfair and assuming motives that do not
exist.  Usually people answer questions when they know the answer, and
don't reply when they don't.

It's not clear to me that the venus/kernel interface is really all that
well defined, in terms of using fixed-width types, vs. including objects
typed according to system types.  And it's not clear to me if those
objects change between Linux for i386 and amd64.  In the past I've had
the impression that interfaces on Linux for different processors can
differ even more than the size of basic types.

  Would somebody give me a hand and either point in the right direction
  for the fix or explain that the solution is unavailable or too expensive?

I suspect what you have to do is run clog, venus and perhaps the kernel
under a debugger and find the part that isn't right.  Surely there are
bugs where the wire protocol from clog<>venus and venus<>kernel changes
due to linux/i386 to linux/amd64, and probably it shouldn't.

I am also unclear on whether the protocols change on NetBSD.  I wouldn't
expect clog<>venus to be different there, but perhaps it's due to
included system types.  I haven't yet run venus on sparc64, but should
try it.  I'll be using native binaries, rather than the 32-bit
emulation, just because that's easier for me.  I don't have a sparc (vs
sparc64) handy running modern enough code to build venus for 32-bit.

  I guess that only a minor change in the includes is needed
  to be able to cross-compile the client on ia32 to work on amd64.

This sounds broken.  I think you should either build it native on amd64,
or build it for i386, against the standard i386 includes.  Having it
built for i386 but with some includes that are different from
i386-on-amd64 sounds like a path to madness and futher inconsistencies.

  Examination of the code around the mount() call did not reveal
  why it would/should fail.
  The struct passed by the call consists of two ints, which seems
  to have the same representation in both 32- and 64-bit mode.

So does venus compiled native in 64-bit mode work?  What does the mount
call look like in this case?
Received on 2007-07-10 20:28:56