From avg@topspin.kiev.ua  Thu Nov 24 12:23:50 2005
Return-Path: <avg@topspin.kiev.ua>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id CB29C16A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 24 Nov 2005 12:23:50 +0000 (GMT)
	(envelope-from avg@topspin.kiev.ua)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
	by mx1.FreeBSD.org (Postfix) with ESMTP id BC45F43D5D
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 24 Nov 2005 12:23:47 +0000 (GMT)
	(envelope-from avg@topspin.kiev.ua)
Received: from oddity.topspin.kiev.ua (oddity-e.topspin.kiev.ua [212.40.38.87])
	by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA15927
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 24 Nov 2005 14:23:41 +0200 (EET)
	(envelope-from avg@topspin.kiev.ua)
Received: from oddity.topspin.kiev.ua (localhost [127.0.0.1])
	by oddity.topspin.kiev.ua (8.13.3/8.13.1) with ESMTP id jAOCNf1B048775
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 24 Nov 2005 14:23:41 +0200 (EET)
	(envelope-from avg@oddity.topspin.kiev.ua)
Received: (from avg@localhost)
	by oddity.topspin.kiev.ua (8.13.3/8.13.1/Submit) id jAOCNeTr048774;
	Thu, 24 Nov 2005 14:23:40 +0200 (EET)
	(envelope-from avg)
Message-Id: <200511241223.jAOCNeTr048774@oddity.topspin.kiev.ua>
Date: Thu, 24 Nov 2005 14:23:40 +0200 (EET)
From: Andriy Gapon <avg@icyb.net.ua>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: vfs doc: some VOP_*(9) manual pages are outdated with respect to vnode locking
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>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:    attilio
>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:  Sun Dec  5 15:40:11 UTC 2010
>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:
Responsible-Changed-From-To: freebsd-doc->attilio 
Responsible-Changed-By: trhodes 
Responsible-Changed-When: Thu Jan 24 00:07:44 UTC 2008 
Responsible-Changed-Why:  
Assign this to Attilio, who has been working on much of the locking and has 
interest in this as well.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=89492 

From: Andriy Gapon <avg@freebsd.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: docs/89492: vfs doc: some VOP_*(9) manual pages are outdated
 with respect to vnode locking
Date: Sun, 05 Dec 2010 17:31:36 +0200

 just curious what the current status of this is :-)
 
 -- 
 Andriy Gapon
>Unformatted:
