Module Name: src Committed By: hannken Date: Mon Apr 17 08:33:40 UTC 2017
Modified Files: src/share/man/man9: vfssubr.9 Log Message: Update vfs_busy(), vfs_unbusy(), vfs_mountalloc() and vfs_rootmountalloc(). To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 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.25 src/share/man/man9/vfssubr.9:1.26 --- src/share/man/man9/vfssubr.9:1.25 Sat May 24 17:14:02 2014 +++ src/share/man/man9/vfssubr.9 Mon Apr 17 08:33:40 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: vfssubr.9,v 1.25 2014/05/24 17:14:02 wiz Exp $ +.\" $NetBSD: vfssubr.9,v 1.26 2017/04/17 08:33:40 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 24, 2014 +.Dd Apr 17, 2017 .Dt VFSSUBR 9 .Os .Sh NAME @@ -77,9 +77,9 @@ .Ft void .Fn vfs_unmountall "struct lwp *l" .Ft int -.Fn vfs_busy "struct mount *mp" "struct mount **nextp" +.Fn vfs_busy "struct mount *mp" .Ft void -.Fn vfs_unbusy "struct mount *mp" "bool keepref" "struct mount **nextp" +.Fn vfs_unbusy "struct mount *mp" .Ft struct mount * .Fn vfs_mountalloc "struct vfsops *vfs" "struct vnode *vp" .Ft int @@ -139,42 +139,17 @@ by the vnode Mount the root file system. .It Fn vfs_unmountall "l" Unmount all file systems. -.It Fn vfs_busy "mp" "nextp" +.It Fn vfs_busy "mp" Mark the mount point specified by .Fa mp as busy and get a reference to it. This function is used to synchronize access and to delay unmounting. The caller must hold a pre-existing reference to the mount. -If -.Fa nextp -is not -.Dv 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" +.It Fn vfs_unbusy "mp" 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 -.Dv 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 @@ -184,14 +159,15 @@ and .Em mnt_op to .Fa vfsops . -On success, mark the mount structure as busy and return its address. +On success return the address of the mount structure. Otherwise, return .Dv NULL . .It Fn vfs_rootmountalloc "fstypename" "devname" "mpp" Lookup a file system type specified by the name .Fa fstypename and if found allocate and initialise a mount structure for it. -The allocated mount structure is returned in the address specified by +The allocated mount structure is marked as busy and returned in the +address specified by .Fa mpp . The device the root file system was mounted from is specified by the argument