Subject: namei() protocol
To: None <tech-kern@NetBSD.ORG>
From: Charles M. Hannum <mycroft@MIT.EDU>
List: tech-kern
Date: 05/05/1997 16:34:40
While reworking namei(), to simplify it after the recent POSIX-induced
changes, I've found a few oddities:

1) I can't fathom why the unlocking of the parent for the |LOCKPARENT
case isn't done in the VOP_LOOKUP() caller.  This would eliminate a
fair bit of redundant code, and avoid extra locks and unlocks.

2) It would make more sense in the !ISLASTCN case for cnp->cn_flags to
always be LOOKUP.  This is the required effect, and it would eliminate
lots of redundant tests.

3) The whole cn_consume idea is moderately a pain in the arse.  It
would make considerably more sense to me to have a callback for the
file system to request the next component from the path name --
thereby keeping all the code for dealing with separators, etc., in
vfs_lookup.c, where it belongs.

Comments?  Anyone?  Bueller?  Kirk?  B-)