After many fixes and enhancements done by jeff@ in the Spring of 2005 to
VFS code, some VOP_*(9) manual pages no longer contain valid information.
This can greately mislead people working on new filesystems for FreeBSD,
or people maintainingg filesystems outside of FreeBSD source tree or people
porting filesystem code from/to earlier versions of FreeBSD.
The most notable change is different expectations on state of vnode lock
after completion of VOP_* calls. For example, VOP_LOOKUP(9) states:
The directory, dvp should be locked on entry. If an error (note: the
return value EJUSTRETURN is not considered an error) is detected, it will
be returned locked. Otherwise, it will be unlocked unless both
LOCKPARENT and ISLASTCN are specified in cnp-_cn_flags. If an entry is
found in the directory, it will be returned locked.
This does not seem to be true any longer and dvp seems to be expected to
stay locked in all cases, because unlocking is done by code in vfs_lookup.c.
PSEUDOCODE section is also outdated in this respect.
Another example of such locking semantics change seems to be VOP_INACTIVE.
Although it is possible to reverse-engineer such changes from differences
in VFS code, this approach is time-consuming and error prone.
I think that it is best to kindly ask jeff@ to update the manual pages in
accordance to the changes that he made.
Assign this to Attilio, who has been working on much of the locking and has
interest in this as well. Thanks!
just curious what the current status of this is :-)
attilio has turned in his commit bit.
To submitter: has this problem been fixed since it was filed?
As far as I can see LOCKS section of VOP_LOOKUP(9) still has incorrect information.