2 .\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice(s), this list of conditions and the following disclaimer as
9 .\" the first lines of this file unmodified other than the possible
10 .\" addition of one or more copyright notices.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice(s), this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
16 .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 .\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
19 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22 .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
32 .Nd "vfs configuration information"
37 .Fn vfs_register "struct vfsconf *vfc"
39 .Fn vfs_unregister "struct vfsconf *vfc"
41 .Fn vfs_modevent "module_t mod" "int type" "void *data"
43 Each file system type known to the kernel has a
45 structure that contains the
46 information required to create a new mount of that file systems type.
49 struct vfsops *vfc_vfsops; /* file system operations vector */
50 char vfc_name[MFSNAMELEN]; /* file system type name */
51 int vfc_typenum; /* historic file system type number */
52 int vfc_refcount; /* number mounted of this type */
53 int vfc_flags; /* permanent flags */
54 struct vfsconf *vfc_next; /* next in list */
58 When a new file system is mounted,
62 structure by its name, and if it is not already registered,
63 attempts to load a kernel module for it.
64 The file system operations for the new mount point are taken from
70 structure is made to point directly at the
74 The file system type number is taken from
78 and the mount flags are taken from a mask of
80 Each time a file system of a given type is mounted,
87 structure and adds it to the list of existing file systems.
88 If the type has not already been registered, it is initialized by calling the
90 function in the file system operations vector.
92 also updates the oid's of any sysctl nodes for this file system type
93 to be the same as the newly assigned type number.
98 from the list of registered file system types if there are currently no mounted instances.
101 function in the file systems initialization vector is defined, it is called.
106 to handle the loading and unloading of file system kernel modules.
117 returns 0 if successful; otherwise,
119 is returned indicating that the file system type has already been registered.
122 returns 0 if successful.
125 entry can be found matching the name in
129 If the reference count of mounted instances of the file system type is not zero,
134 is called, any errors it returns will be returned by
138 returns the result of the call to
145 .Xr vfs_rootmountalloc 9 ,
148 This manual page was written by
149 .An Chad David Aq Mt davidc@acns.ab.ca .