Coda File System

Re: Continued: 64-bit issues

From: Greg Troxel <gdt_at_ir.bbn.com>
Date: Fri, 06 Aug 2004 09:26:14 -0400
  Well, but this absolutely not portable to pure 64-bit Systems - but what
  about using u_int64_t? I'll try... But is this the preferred solution for
  such problems? Are there any better solutions?

The really right answer is to do two things:

  in the 64-bit kernel environment, use the right types for pointers,
  and make venus etc. be compilable in 64-bit mode.  The latter is
  widely viewed as hard.

  on 64-bit kernels, when running 32-bit userland programs such as
  venus, make the ioctls use compatibility structures instead so that
  they correctly interpret the memory layout generated by the 32-bit
  programs.

If you just change the ioctl to u_int64_t, and compile venus against
the old coda.h, the types won't match.  But if you change the ioctl
type to be u_int64_t in the kernel, cast those values to pointers, and
change the userspace code that writes pointers to cast to u_int64_t,
it ought to be at least close to working.   This of course is a
version bump for the user/kernel coda interface, since the memory
layout is different.  But not a big deal since it has not yet worked
on a 64-bit machine.
Received on 2004-08-06 09:31:08