]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - share/man/man9/vfs_mount.9
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / share / man / man9 / vfs_mount.9
1 .\"
2 .\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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.
14 .\"
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
25 .\" DAMAGE.
26 .\"
27 .\" $FreeBSD$
28 .\"
29 .Dd November 26, 2004
30 .Dt VFS_MOUNT 9
31 .Os
32 .Sh NAME
33 .Nm vfs_mount
34 .Nd "generic file system mount function"
35 .Sh SYNOPSIS
36 .In sys/param.h
37 .In sys/mount.h
38 .Ft int
39 .Fo vfs_mount
40 .Fa "struct thread *td"
41 .Fa "const char *fstype"
42 .Fa "char *fspath"
43 .Fa "int fsflags"
44 .Fa "void *fsdata"
45 .Fc
46 .Sh DESCRIPTION
47 The
48 .Fn vfs_mount
49 function handles the generic portion of mounting a file system,
50 and calls the file system specific mount function after verifying
51 its parameters and setting up the structures expected by the
52 underlying mount code.
53 .Pp
54 .Fn vfs_mount
55 is called directly by the
56 .Xr mount 2
57 system call.
58 .Pp
59 Its arguments are:
60 .Bl -tag -width ".Fa fsflags"
61 .It Fa td
62 The thread responsible for this call.
63 .It Fa fstype
64 The type of file system being mounted.
65 .It Fa fspath
66 The path to the mount point of the file system.
67 .It Fa fsflags
68 Flags controlling the mount.
69 See
70 .Xr mount 2
71 for details.
72 .Pp
73 .Dv MNT_EXPORTED , MNT_NOSUID , MNT_UPDATE , MNT_RELOAD ,
74 .Dv MNT_FORCE , MNT_ASYNC , MNT_SYNCHRONOUS , MNT_UNION , MNT_NOATIME ,
75 .Dv MNT_SNAPSHOT , MNT_NOCLUSTERR , MNT_NOCLUSTERW , MNT_IGNORE ,
76 .Dv MNT_UNION , MNT_NOSYMFOLLOW
77 .It Fa fsdata
78 File system specific data structure.
79 It is in userspace
80 when passed to
81 .Fn vfs_mount
82 and is left untouched when passed to file system's
83 .Fn mount .
84 .El
85 .Sh RETURN VALUES
86 A 0 value is returned on success.
87 .Sh ERRORS
88 .Bl -tag -width Er
89 .It Bq Er ENAMETOOLONG
90 The fs type or the mount point path is too long or any individual
91 path component is too long.
92 .It Bq Er EPERM
93 Permission denied.
94 There are a number of reason this can occur
95 ranging from the user not having permission to mount a file system
96 to the securelevel being to high to load the
97 .Fa fstype
98 module.
99 .It Bq Er EINVAL
100 Invalid operation (ex: trying to update a non mount-point).
101 .It Bq Er ENOENT
102 The mount point does not exist (from
103 .Fn namei ) .
104 .It Bq Er ELOOP
105 The mount point is a muddle of links (from
106 .Fn namei ) .
107 .It Bq Er EOPNOTSUPP
108 The operation is not supported (ex: reloading a r/w file system).
109 .It Bq Er EBUSY
110 The mount point is busy or is not really a mount point (on update).
111 .It Bq Er ENOTDIR
112 The mount point is not a directory.
113 .It Bq Er ENODEV
114 The kernel linker was unable to load the specified
115 .Fa fstype
116 or was unable to find the specified
117 .Fa fstype
118 module.
119 .El
120 .Pp
121 Other errors can be returned by the file system's
122 .Fn mount
123 and
124 you should check the specific file system for details.
125 Also
126 this call relies on a large number of other kernel services
127 whose errors it returns so this list may not be exhaustive.
128 .Sh SEE ALSO
129 .Xr mount 2 ,
130 .Xr mount 8
131 .Pp
132 .Va vfs.usermount
133 .Sh AUTHORS
134 This manual page was written by
135 .An Chad David Aq davidc@acns.ab.ca .