Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/man/man9 Move vfs interface out of vfsops.9 into its o...



details:   https://anonhg.NetBSD.org/src/rev/1919e60178be
branches:  trunk
changeset: 545279:1919e60178be
user:      gmcgarry <gmcgarry%NetBSD.org@localhost>
date:      Sun Apr 06 07:09:47 2003 +0000

description:
Move vfs interface out of vfsops.9 into its own page.  Document
it completely.

diffstat:

 share/man/man9/Makefile  |   29 ++++-
 share/man/man9/vfsops.9  |   39 +--------
 share/man/man9/vfssubr.9 |  208 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 232 insertions(+), 44 deletions(-)

diffs (truncated from 350 to 300 lines):

diff -r f64e33dbb4f5 -r 1919e60178be share/man/man9/Makefile
--- a/share/man/man9/Makefile   Sun Apr 06 07:07:41 2003 +0000
+++ b/share/man/man9/Makefile   Sun Apr 06 07:09:47 2003 +0000
@@ -1,4 +1,4 @@
-#       $NetBSD: Makefile,v 1.140 2003/04/04 20:55:25 wiz Exp $
+#       $NetBSD: Makefile,v 1.141 2003/04/06 07:09:48 gmcgarry Exp $
 
 #      Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -30,7 +30,8 @@
        scsipi.9 setjmp.9 setrunqueue.9 shutdownhook_establish.9 \
        signal.9 softintr.9 spl.9 store.9 suser.9 suspendsched.9 \
        tc.9 time.9 todr.9 uiomove.9 ucom.9 userret.9 \
-       vattr.9 vfs.9 vfsops.9 vme.9 vnfileops.9 vnode.9 vnodeops.9 vnsubr.9 \
+       vattr.9 vfs.9 vfsops.9 vfssubr.9 vme.9 vnfileops.9 \
+       vnode.9 vnodeops.9 vnsubr.9 \
        usbdi.9 uvm.9 wdc.9 wscons.9 wsdisplay.9 wsfont.9 wskbd.9 wsmouse.9
 
 MAN+=  dmover.9
@@ -450,10 +451,7 @@
        vme.9 vme_space_get.9
 MLINKS+=vattr.9 vattr_null.9 \
        vattr.9 VATTR_NULL.9
-MLINKS+=vfsops.9 vfs_rootmountalloc.9 \
-       vfsops.9 vfs_export_lookup.9 \
-       vfsops.9 vfs_getnewfsid.9 \
-       vfsops.9 VFS_MOUNT.9 \
+MLINKS+=vfsops.9 VFS_MOUNT.9 \
        vfsops.9 VFS_START.9 \
        vfsops.9 VFS_UNMOUNT.9 \
        vfsops.9 VFS_ROOT.9 \
@@ -464,6 +462,24 @@
        vfsops.9 VFS_FHTOVP.9 \
        vfsops.9 VFS_VPTOFH.9 \
        vfsops.9 VFS_CHECKEXP.9
+MLINKS+=vfssubr.9 vfs_getnewfsid.9 \
+       vfssubr.9 vfs_getvfs.9 \
+       vfssubr.9 vfs_export.9 \
+       vfssubr.9 vfs_showexport.9 \
+       vfssubr.9 vfs_export_lookup.9 \
+       vfssubr.9 vfs_setpublic.9 \
+       vfssubr.9 vfs_mountedon.9 \
+       vfssubr.9 vfs_mountroot.9 \
+       vfssubr.9 vfs_unmountall.9 \
+       vfssubr.9 vfs_busy.9 \
+       vfssubr.9 vfs_unbusy.9 \
+       vfssubr.9 vfs_rootmountalloc.9 \
+       vfssubr.9 vfs_shutdown.9 \
+       vfssubr.9 vfs_attach.9 \
+       vfssubr.9 vfs_detach.9 \
+       vfssubr.9 vfs_reinit.9 \
+       vfssubr.9 vfs_getopsbyname.9 \
+       vfssubr.9 vfs_sysctl.9
 MLINKS+=vnode.9 vcount.9 \
        vnode.9 vref.9 \
        vnode.9 VREF.9 \
@@ -480,7 +496,6 @@
        vnode.9 vgone.9 \
        vnode.9 vgonel.9 \
        vnode.9 vflush.9 \
-       vnode.9 vfs_shutdown.9 \
        vnode.9 vaccess.9 \
        vnode.9 checkalias.9 \
        vnode.9 bdevvp.9 \
diff -r f64e33dbb4f5 -r 1919e60178be share/man/man9/vfsops.9
--- a/share/man/man9/vfsops.9   Sun Apr 06 07:07:41 2003 +0000
+++ b/share/man/man9/vfsops.9   Sun Apr 06 07:09:47 2003 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: vfsops.9,v 1.9 2003/02/04 22:38:19 perry Exp $
+.\"     $NetBSD: vfsops.9,v 1.10 2003/04/06 07:09:47 gmcgarry Exp $
 .\"
 .\" Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -39,9 +39,6 @@
 .Os
 .Sh NAME
 .Nm vfsops ,
-.Nm vfs_rootmountalloc ,
-.Nm vfs_export_lookup ,
-.Nm vfs_getnewfsid ,
 .Nm VFS_MOUNT ,
 .Nm VFS_START ,
 .Nm VFS_UNMOUNT ,
@@ -60,14 +57,6 @@
 .Fd #include \*[Lt]sys/mount.h\*[Gt]
 .Fd #include \*[Lt]sys/vnode.h\*[Gt]
 .Ft int
-.Fn vfs_rootmountalloc "char *fstypename" "char *devname" \
-"struct mount **mpp"
-.Ft int
-.Fn vfs_export_lookup "struct mount *mp" "struct netexport *nep" \
-"struct export_args *argp"
-.Ft void
-.Fn vfs_getnewfsid "struct mount *mp"
-.Ft int
 .Fn VFS_MOUNT "struct mount *mp" "const char *path" "void *data" \
 "struct nameidata *ndp" "struct proc *p"
 .Ft int
@@ -187,31 +176,6 @@
 code for sysctl operations which are file system specific.
 .Sh FUNCTIONS
 .Bl -tag -width compact
-.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
-.Fa mpp .
-The device the root file system was mounted from is specified by the
-argument
-.Fa devname
-and is recorded in the new mount structure.
-.It Fn vfs_export_lookup "mp" "nep" "argp"
-Check client permission on the exportable file system specified by the
-mount structure
-.Fa mp .
-The argument
-.Fa nam
-is the address of the networked client.
-This function is used by file system type specific functions to verify
-that the client can access the file system.
-.It Fn vfs_getnewfsid "mp"
-Get a new unique file system id type for the file system specified by
-the mount structure
-.Fa mp .
-The file system id type is stored in
-.Em mp-\*[Gt]mnt_stat.f_fsid .
 .It Fn VFS_MOUNT "mp" "path" "data" "ndp" "p"
 Mount a file system specified by the mount structure
 .Fa mp
@@ -402,6 +366,7 @@
 .Xr intro 9 ,
 .Xr namei 9 ,
 .Xr vfs 9 ,
+.Xr vfssubr 9 ,
 .Xr vnode 9 ,
 .Xr vnodeops 9
 .Sh HISTORY
diff -r f64e33dbb4f5 -r 1919e60178be share/man/man9/vfssubr.9
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man9/vfssubr.9  Sun Apr 06 07:09:47 2003 +0000
@@ -0,0 +1,208 @@
+.\"     $NetBSD: vfssubr.9,v 1.1 2003/04/06 07:09:48 gmcgarry Exp $
+.\"
+.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Gregory McGarry.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"        This product includes software developed by the NetBSD
+.\"        Foundation, Inc. and its contributors.
+.\" 4. Neither the name of The NetBSD Foundation nor the names of its
+.\"    contributors may be used to endorse or promote products derived
+.\"    from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd April 6, 2003
+.Dt VFSSUBR 9
+.Os
+.Sh NAME
+.Nm vfssubr ,
+.Nm vfs_getnewfsid ,
+.Nm vfs_getvfs ,
+.Nm vfs_export ,
+.Nm vfs_showexport ,
+.Nm vfs_export_lookup ,
+.Nm vfs_setpublicfs ,
+.Nm vfs_mountedon ,
+.Nm vfs_mountroot ,
+.Nm vfs_unmountall ,
+.Nm vfs_busy ,
+.Nm vfs_unbusy ,
+.Nm vfs_rootmountalloc ,
+.Nm vfs_shutdown ,
+.Nm vfs_attach ,
+.Nm vfs_detach ,
+.Nm vfs_reinit ,
+.Nm vfs_getopsbyname ,
+.Nm vfs_sysctl
+.Nd high-level interface to kernel file system interface
+.Sh SYNOPSIS
+.Fd #include \*[Lt]sys/param.h\*[Gt]
+.Fd #include \*[Lt]sys/mount.h\*[Gt]
+.Fd #include \*[Lt]sys/vnode.h\*[Gt]
+.Ft void
+.Fn vfs_getnewfsid "struct mount *mp"
+.Ft struct mount *
+.Fn vfs_getvfs "fsid_t *fsid"
+.Ft int
+.Fn vfs_export "struct mount *mp" "struct netexport *nep" \
+"struct export_args *argp"
+.Ft void
+.Fn vfs_showexport "struct mount *mp" "struct export_args *argp" \
+"struct netexport *nep"
+.Ft int
+.Fn vfs_export_lookup "struct mount *mp" "struct netexport *nep" \
+"struct export_args *argp"
+.Ft int
+.Fn vfs_setpublicfs "struct mount *mp" "struct netexport *nep" \
+"struct export_args *argp"
+.Ft int
+.Fn vfs_mountedon "struct vnode *vp"
+.Ft int
+.Fn vfs_mountroot "void"
+.Ft void
+.Fn vfs_unmountall  "struct proc *p"
+.Ft int
+.Fn vfs_busy "struct mount *mp" "int flags" "struct simplelock *interlkp"
+.Ft void
+.Fn vfs_unbusy "struct mount *mp"
+.Ft int
+.Fn vfs_rootmountalloc "char *fstypename" "char *devname" \
+"struct mount **mpp"
+.Ft void
+.Fn vfs_shutdown "void"
+.Ft int
+.Fn vfs_attach "struct vfsops *vfs"
+.Ft int
+.Fn vfs_detach "struct vfsops *vfs"
+.Ft void
+.Fn vfs_reinit "void"
+.Ft struct vfsops *
+.Fn vfs_getopsbyname "const char *name"
+.Ft int
+.Fn vfs_sysctl "int *name" "u_int namelen" "void *oldp" "size_t *oldlenp" \
+"void *newp" "size_t newlen" "struct proc *p"
+.Sh DESCRIPTION
+The high-level functions described in this page are the interface to
+the kernel file system interface (VFS).
+.Sh FUNCTIONS
+.Bl -tag -width compact
+.It Fn vfs_getnewfsid "mp"
+Get a new unique file system id type for the file system specified by
+the mount structure
+.Fa mp .
+The file system id type is stored in
+.Em mp-\*[Gt]mnt_stat.f_fsid .
+.It Fn vfs_getvfs "fsid"
+Lookup a mount point with the file system identifier
+.Fa fsid .
+.It Fn vfs_export "mp" "nep" "argp"
+Undocumented.
+.It Fn vfs_showexport "mp" "argp" "nep"
+Undocumented.
+.It Fn vfs_export_lookup "mp" "nep" "argp"
+Check client permission on the exportable file system specified by the
+mount structure
+.Fa mp .
+The argument
+.Fa nam
+is the address of the networked client.
+This function is used by file system type specific functions to verify
+that the client can access the file system.
+.It Fn vfs_setpublicfs "mp" "nep" "argp"
+Set the publicly exported file system specified by the mount structure
+.Fa mp .
+.It Fn vfs_mountedon "vp"
+Check to see if a file system is mounted on a block device specified
+by the vnode
+.Fa vp .
+.It Fn vfs_mountroot "void"
+Mount the root file system.
+.It Fn vfs_unmountall  "p"
+Unmount all file systems.
+.It Fn vfs_busy "mp" "flags" "interlkp"
+Mark the mount point specified by
+.Fa mp
+as busy.  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
+.Fa mp .
+.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.



Home | Main Index | Thread Index | Old Index