Module Name: src Committed By: hannken Date: Sat Feb 22 10:05:54 UTC 2014
Modified Files: src/share/man/man9: vfssubr.9 Log Message: Update the description of vfs_busy() and vfs_unbusy(). To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/share/man/man9/vfssubr.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/vfssubr.9 diff -u src/share/man/man9/vfssubr.9:1.20 src/share/man/man9/vfssubr.9:1.21 --- src/share/man/man9/vfssubr.9:1.20 Thu Dec 2 12:54:13 2010 +++ src/share/man/man9/vfssubr.9 Sat Feb 22 10:05:54 2014 @@ -1,4 +1,4 @@ -.\" $NetBSD: vfssubr.9,v 1.20 2010/12/02 12:54:13 wiz Exp $ +.\" $NetBSD: vfssubr.9,v 1.21 2014/02/22 10:05:54 hannken Exp $ .\" .\" Copyright (c) 2003, 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 May 9, 2009 +.Dd February 22, 2014 .Dt VFSSUBR 9 .Os .Sh NAME @@ -74,9 +74,9 @@ .Ft void .Fn vfs_unmountall "struct lwp *l" .Ft int -.Fn vfs_busy "struct mount *mp" "int flags" "struct simplelock *interlkp" +.Fn vfs_busy "struct mount *mp" "struct mount **nextp" .Ft void -.Fn vfs_unbusy "struct mount *mp" +.Fn vfs_unbusy "struct mount *mp" "bool keepref" "struct mount **nextp" .Ft struct mount * .Fn vfs_mountalloc "struct vfsops *vfs" "struct vnode *vp" .Ft int @@ -130,17 +130,38 @@ by the vnode Mount the root file system. .It Fn vfs_unmountall "l" Unmount all file systems. -.It Fn vfs_busy "mp" "flags" "interlkp" +.It Fn vfs_busy "mp" "nextp" Mark the mount point specified by .Fa mp -as busy. +as busy and get a reference to it. This function is used to synchronize access and to delay unmounting. -The interlock specified by argument -.Fa interlkp -is not released on failure. -.It Fn vfs_unbusy "mp" -Free the busy file system specified by the mount structure +The caller must hold a pre-existing reference to the mount. +If +.Fa nextp +is not NULL, the caller must hold the +.Em mountlist_lock +and +.Fa nextp +will receive the next mount from mount list on error. +The +.Em mountlist_lock +is released on return. +.It Fn vfs_unbusy "mp" "keepref" "nextp" +Undo a +.Fn vfs_busy +on the mount point specified by .Fa mp . +If +.Fa keepref +is true, preserve the reference added by +.Fn vfs_busy . +If +.Fa nextp +is not NULL, the +.Em mountlist_lock +will be aquired and +.Fa nextp +will receive the next mount from mount list. .It Fn vfs_mountalloc "vfsops" "vp" Allocate and initialise a mount structure, setting .Em mnt_vnodecovered