[OpenAFS-devel] porting openafs to another linux - problems with vRefcount type.. .

Neulinger, Nathan nneul@umr.edu
Fri, 5 Oct 2001 13:10:21 -0500


I've got it mostly building, except for anything to do with reference
counts:

../afs/afs_callback.c: In function `SRXAFSCB_GetCE':
../afs/afs_callback.c:160: incompatible types in assignment
make[1]: *** [afs_callback.o] Error 1
../afs/afs_daemons.c: In function `afs_BQueue':
../afs/afs_daemons.c:535: wrong type argument to increment
make[1]: *** [afs_daemons.o] Error 1
../afs/afs_osidnlc.c: In function `osi_dnlc_lookup':
../afs/afs_osidnlc.c:250: wrong type argument to increment
make[1]: *** [afs_osidnlc.o] Error 1
../afs/afs_util.c: In function `afs_CheckLocks':
../afs/afs_util.c:185: invalid operands to binary !=
make[1]: *** [afs_util.o] Error 1
../afs/afs_vcache.c: In function `afs_NewVCache':
../afs/afs_vcache.c:585: invalid operands to binary !=
../afs/afs_vcache.c:723: invalid operands to binary ==
../afs/afs_vcache.c:818: incompatible types in assignment
../afs/afs_vcache.c: In function `afs_FlushActiveVcaches':
../afs/afs_vcache.c:1036: wrong type argument to increment
../afs/afs_vcache.c:1075: wrong type argument to increment
../afs/afs_vcache.c: In function `afs_GetRootVCache':
../afs/afs_vcache.c:1951: wrong type argument to increment
../afs/afs_vcache.c: In function `afs_FindVCache':
../afs/afs_vcache.c:2381: wrong type argument to increment
../afs/afs_vcache.c: In function `afs_NFSFindVCache':
../afs/afs_vcache.c:2527: wrong type argument to increment
make[1]: *** [afs_vcache.o] Error 1


Those are almost all (or all) references to vnhold or similar, which
increments the reference count.

If I change vrefCount to vrefCount.counter they get past the error. (Or
simpler, if I add .counter to the references to i_count in osi_vfs.h.) I've
got it ifdef'd currently, but I'm curious as to why this is necessary.

What is going on special on parisc-linux (or on i386_linux) that allows it
to work on one, but not on the other? Both look to have the same definition
for atomic_t.

-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@umr.edu
University of Missouri - Rolla         Phone: (573) 341-4841
Computing Services                       Fax: (573) 341-4216