[OpenAFS-devel] Refactoring the Solaris libafs code base

Dale Ghent daleg@elemental.org
Mon, 25 Dec 2006 16:43:37 -0500


I'm kind of looking for some guidance in this email as well as to  
proffer some changes in a few realms, including OS rev. support cut- 
off, conversion to vn_alloc(), and a en masse cleaning up of  src/afs/ 
SOLARIS code.

1) Proposal to cut off support for revisions less than Solaris 2.6.

To be honest, my own opinion is that even 2.6 is too old to care  
about and Solaris 7 is such a stepchild that the cut-off should be  
8... even as far as Sun is concerned, 2.6's supportability has  
expired and you can get help for it only if you have a specialized  
support contract.

But since 2.6 brought us a full palette of 64bit typedefs and  
associated goodness, and thus the VFS/VNODE interfaces are (by and  
large) the same between 2.6 and 8, supporting 2.6 should be of no  
undue burden. That said there's very little compelling reason to  
still keep code specific to Solaris 2.5.1 and lower around. Raise  
your hand if you have a 2.5.1 or lower server where you always  
absoltively, posolutely need the latest afs client on it. Anyone? Ok,  
I thought so.

Anyway, this proposal dovetails with:

2) Clean up src/afs/SOLARIS code.

Old-style function definitions. Improper typedefs for lots of things,  
tons of missing declarations, header file includes are never clear,  
and other niggling items. I'd really like to clean this up, at least  
for the sake of readability and actually being able to see compiler  
warnings which matter rather than having to pick through the many  
"normally" emitted. This raises some questions:

    2a) There seems to be a largely abandoned osi_prototypes.h file.  
Should all functions introduced in the osi_*.c files go in that one  
header file, or should those functions be declared in a companion  
header files (eg: osi_groups.h, osi_vfsops.h, etc.)

    2b) src/afs/sysincludes.h uber alles? Or src/afs/UKERNEL/ 
sysincludes.h ? What's the deal with UKERNEL anyway??

    2c) #ifdef FOO, or #if defined(FOO) - is there a general  
preference for one or the other format?


3) Actually improving the Solaris AFS client driver. Between the  
Solaris Internals 2nd edition book and several choice blogs.sun.com  
posts, and reviewing fs code from src.opensolaris.org, it seems we  
can stand some updates. DNLC isn't being used (we do call dnlc_enter 
() and dnlc_remove() but with junk, and lookups are not done). The  
prescribed way of creating and killing vnodes isn't being done  
(vn_alloc). I also want to reduce dependancy or remove direct  
accesses to any private kernel functions or structs.

4) Source patches - What do the GKs prefer to deal with - one huge  
one or lots of small ones?

-------

I'd like to do 1 and 2 first, and then work on 3 afterwards. Any  
issues with #3 can be discussed later, but I'd like to solicit  
opinions or historical context related to proposals 1 and 2.

/dale

--
Dale Ghent
UNIX Systems Specialist
UMBC - Office of Information Technology
ECS 201 - x51705