Date: Thu, 24 Nov 2005 14:23:40 +0200 (EET) From: Andriy Gapon <avg@icyb.net.ua> To: FreeBSD-gnats-submit@FreeBSD.org Subject: docs/89492: vfs doc: some VOP_*(9) manual pages are outdated with respect to vnode locking Message-ID: <200511241223.jAOCNeTr048774@oddity.topspin.kiev.ua> Resent-Message-ID: <200511241230.jAOCU2QJ054017@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 89492 >Category: docs >Synopsis: vfs doc: some VOP_*(9) manual pages are outdated with respect to vnode locking >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 24 12:30:02 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Andriy Gapon >Release: FreeBSD 5.4-RELEASE-p3 i386 >Organization: >Environment: 6-STABLE, CURRENT >Description: 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: http://www.freebsd.org/cgi/man.cgi?query=VOP_LOOKUP&apropos=0&sektion=9&manpath=FreeBSD+7.0-current&format=html LOCKS 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. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511241223.jAOCNeTr048774>