[OpenAFS-devel] 1.3.79 on AIX 5.2, system dump when using token

Derrick J Brashear shadow@dementia.org
Mon, 14 Mar 2005 14:24:12 -0500 (EST)


On Mon, 14 Mar 2005, Niklas Edmundsson wrote:

> I had a closer look att the #ifdef-swamp starting at rxi_Alloc() and noted 
> that quite a lot of code is only used on AIX and older HPUX-versions. I took

There are a lot of places like that. I recently cleaned up src/afs/VNOPS 
where the "generic" code had been tainted with the OSF-specific bits.

> In general, there seems to be a large confusion regarding where&when to do 
> locking and where in the code to add OS-related compatibility. I believe that 
> all compatibility crud should be in the "leaves" of the source code tree, but 
> in OpenAFS there are #ifdefs everywhere making it hard to actually read the 
> code... Am I right in assuming that the "throw in a lock here to make it work 
> on architecture X"-ifdefs are a remnant of the old Transarc-days?

Substantially, yes. They started to break it into os independent (osi) and 
os dependent pieces but it was never finished.

> Is there some effort to clean up this mess, or can we expect more of 
> "architecture X starts to mysterously fail due to code-fork by #ifdef" in the 
> future?

no single concentrated effort. a lot of the cleanup gets done when someone 
is otherwise touching a file or directory of files; i know i have 
prototyped and rewritten code when i otherwise needed to touch it. we're 
still not 100% prototyped and so every once in a while when i go in a 
directory i just prototype the whole thing.