Subject: Possible VOP_LOOKUP() interface change
To: None <>
From: Charles M. Hannum <>
List: tech-kern
Date: 09/03/1999 15:00:35
One of the things that has been a repeated pain in the arse when
hacking on VOP_LOOKUP() routines is the semantics of ISLASTCN,
{LOCK,WANT}PARENT and cn_nameiop.  To DTRT, it is necessary for every
usage of cn_nameiop, LOCKPARENT and WANTPARENT to also test ISLASTCN

This is pretty silly, in that it would be trivial to set cn_nameiop to
LOOKUP, and turn off the *PARENT bits, in the flags passed to the file
system lookup function.  This would simplify the code and generally
make it less error-prone.

Note that such a change will not break existing file systems; they
will continue to do the extra tests, but they will be no-ops.

However, this change will break file systems that hack around with the
path name behind namei().  The only one that does this is portal, and
I suggest that breaking such a kluge is not only unimportant, but
perhaps a service to the community, as it will force someone who cares
to come up with a better abstraction.  B-)

Any thoughts on this?