Module Name: src Committed By: dholland Date: Mon Jul 21 05:56:26 UTC 2014
Modified Files: src/share/man/man9: vnodeops.9 Log Message: Adjustments based on suggestions from gnrp in PR 45276: - fix argument names of VOP_REMOVE - mention deprecated behavior of calling VOP_GETATTR unlocked - mention rename lock To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/share/man/man9/vnodeops.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/man/man9/vnodeops.9 diff -u src/share/man/man9/vnodeops.9:1.93 src/share/man/man9/vnodeops.9:1.94 --- src/share/man/man9/vnodeops.9:1.93 Thu Feb 27 16:51:37 2014 +++ src/share/man/man9/vnodeops.9 Mon Jul 21 05:56:26 2014 @@ -1,4 +1,4 @@ -.\" $NetBSD: vnodeops.9,v 1.93 2014/02/27 16:51:37 hannken Exp $ +.\" $NetBSD: vnodeops.9,v 1.94 2014/07/21 05:56:26 dholland Exp $ .\" .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 27, 2014 +.Dd July 21, 2014 .Dt VNODEOPS 9 .Os .Sh NAME @@ -135,7 +135,7 @@ .Fn VOP_SEEK "struct vnode *vp" "off_t oldoff" "off_t newoff" \ "kauth_cred_t cred" .Ft int -.Fn VOP_REMOVE "struct vnode *vp" "struct vnode *vp" \ +.Fn VOP_REMOVE "struct vnode *dvp" "struct vnode *vp" \ "struct componentname *cnp" .Ft int .Fn VOP_LINK "struct vnode *dvp" "struct vnode *vp" \ @@ -555,6 +555,10 @@ Attributes which are not available are s .Pp For more information on vnode attributes see .Xr vattr 9 . +Historically it was considered acceptable to call +.Fn VOP_GETATTR +without first locking the vnode. +This usage is deprecated. .Pp The vnode .Fa vp @@ -851,11 +855,18 @@ is the pathname component about the file If the operation is successful zero is returned, otherwise an error code is returned. .Pp +The caller must hold the target file system's rename lock. The source directory and file vnodes should be unlocked and their reference counts should be incremented before entry. The target directory and file vnodes should both be locked on entry. .Fn VOP_RENAME updates the reference counts prior to returning. +.Pp +Because of the complexity and nastiness of the interface, please do +not write new code that calls +.Fn VOP_RENAME +directly until such time as ongoing cleanup work reaches a point where +the interface has been rendered halfway sane. .It Fn VOP_MKDIR "dvp" "vpp" "cnp" "vap" Make a new directory in a given directory. The argument