Coda File System

Re: coda on amd64?

From: Brett Lymn <>
Date: Sat, 3 Jan 2004 23:18:29 +1030
On Sat, Jan 03, 2004 at 01:00:00AM -0500, Jan Harkes wrote:
> The biggest problem is really RPC2, which defines RPC2_Integer as a
> signed long integer. This percolates all throughout the rest of the code
> and causes serious problems because all the data structures end up not
> matching with other 32-bit clients (and probably the kernel module).

oh dear, that sounds ugly.

> Simply changing the RPC2_Integer typedef results in hundreds of compiler
> warnings and leaves several things unresolved, should file lenghts be
> 32-bit as with the existing systems or become 64-bit and break
> compatibility.

To be honest, I think changing file lengths to be 64bit should be done
(not soley because it is convenient for my cause :) but from the
perspective that most OS'es I know already use a 64bit quantity for
the file size - even if they are running a 32bit version.  It would
make sense if coda matched that capability.

> It also causes many problematic cases caused by casts
> that do something like, (long *)&rpc2_integer_type, which works just
> fine on a 32-bit machine where sizeof(long) == sizeof(int), but
> introduces a pretty serious bug on 64-bit machines. And as the casts
> hide the compiler warnings, this goes mostly unnoticed until we try to
> use the value and get bad data, or when we silently corrupt adjacent
> memory by storing new data to the 'long *'.

Mmmmmm casting abuse :)  Given that my main coda server at home is now
a 64bit machine it looks like I have some work to do.

Brett Lymn
Received on 2004-01-15 18:37:05