Coda File System

coda-4.3.13 src: 64-bit safety problems

From: Jim Doyle <>
Date: Sat, 7 Feb 1998 20:58:14 -0500 (EST)
Tonight, as a respite from my DCE hacking, I decided to give a go at
porting Coda to Linux/Alpha. I am running Redhat 5.0 (2.0.32 kernel) on
several fairly beefy Alpha servers.

There are 64-bit safety hazards throughout Coda. I dont believe any of
them will be difficult to fix - its just really busy work. For those
of you that dont understand this:    A virtual memory address (i.e. a 
void * or an anything *) is a 64 bit integer. This corresponds to
the "unsigned long int" datatype. On non-AXP machines (Intel, SPARC, PPC),
a virtual memory address is 32-bits, and can fit into an "int" type.

Now would be a good time (or, at the next Coda src freeze point) to
go make Coda 64-bit safe. As I said its just alot of busy work.

For one, we'd need to fix macro's like this:

		CDEBUG(D_CNODE, "LINKING: ino %ld,  at 0x%x with cnp 0x%x, cnp->c_vnode 0x%x, in->u.generic_ip 0x%x\n", (*inode)->i_ino, (int) (*inode), (int) cnp, (int)cnp->c_vnode, (int) (*inode)->u.generic_ip);

		CDEBUG(D_CNODE, "LINKING: ino %ld,  at 0x%lx with cnp 0x%lx, cnp->c_vnode 0x%lx, in->u.generic_ip 0x%lx\n", (*inode)->i_ino, (caddr_t) (*inode), (caddr_t) cnp, (caddr_t)cnp->c_vnode, (caddr_t) (*inode)->u.generic_ip);

The cast to (caddr_t) insures that pointers are passed as native address
types. On the alpha, a caddr_t == unsigned long,  on an Intel box, its an

There are, of course, other ares that need to be changed. Compiler warning
messages can help find almost all of the places that changes need to be made.

Other than that, I can handle writing the Alpha assembly code for
rlwp. Thats the easy part. We might as well do this soon, because if 
Coda takes off, you will run into problems later porting to Merced,
MIPS and the newer PowerPCs.

-- Jim

Jim Doyle                         Boston University   Information Technology
Systems Analyst/Programmer        email:   Distributed Systems
						      tel. (617)-353-8248
Received on 1998-02-07 21:00:34