2001-07-09 06:47:10 +00:00
|
|
|
.\"
|
|
|
|
.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" 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(s), this list of conditions and the following disclaimer as
|
|
|
|
.\" the first lines of this file unmodified other than the possible
|
|
|
|
.\" addition of one or more copyright notices.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice(s), this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``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 COPYRIGHT HOLDER(S) 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.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
|
|
|
.Dd July 8, 2001
|
|
|
|
.Dt VFS_MOUNT 9
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm vfs_mount
|
2001-07-11 10:31:49 +00:00
|
|
|
.Nd "generic filesystem mount function"
|
2001-07-09 06:47:10 +00:00
|
|
|
.Sh SYNOPSIS
|
2001-07-11 10:31:49 +00:00
|
|
|
.In sys/param.h
|
|
|
|
.In sys/mount.h
|
2001-07-09 06:47:10 +00:00
|
|
|
.Ft int
|
2001-12-14 09:25:11 +00:00
|
|
|
.Fo vfs_mount
|
|
|
|
.Fa "struct thread *td"
|
|
|
|
.Fa "const char *fstype"
|
|
|
|
.Fa "char *fspath"
|
|
|
|
.Fa "int fsflags"
|
|
|
|
.Fa "void *fsdata"
|
|
|
|
.Fc
|
2001-07-09 06:47:10 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
2001-07-11 10:31:49 +00:00
|
|
|
.Fn vfs_mount
|
2001-07-09 06:47:10 +00:00
|
|
|
function handles the generic portion of mounting a filesystem,
|
|
|
|
and calls the filesystem specific mount function after verifying
|
|
|
|
its parameters and setting up the structures expected by the
|
|
|
|
underlying mount code.
|
|
|
|
.Pp
|
2001-07-11 10:31:49 +00:00
|
|
|
.Fn vfs_mount
|
|
|
|
is called directly by the
|
|
|
|
.Xr mount 2
|
|
|
|
system call.
|
2001-07-09 06:47:10 +00:00
|
|
|
.Pp
|
|
|
|
Its arguments are:
|
2001-07-13 09:09:52 +00:00
|
|
|
.Bl -tag -width ".Fa fsflags"
|
2001-10-06 11:19:41 +00:00
|
|
|
.It Fa td
|
|
|
|
The thread responsible for this call.
|
2001-07-11 10:31:49 +00:00
|
|
|
.It Fa fstype
|
2001-07-09 06:47:10 +00:00
|
|
|
The type of filesystem being mounted.
|
2001-07-11 10:31:49 +00:00
|
|
|
.It Fa fspath
|
2001-07-09 06:47:10 +00:00
|
|
|
The path to the mount point of the filesystem.
|
2001-07-11 10:31:49 +00:00
|
|
|
.It Fa fsflags
|
|
|
|
Flags controlling the mount.
|
|
|
|
See
|
|
|
|
.Xr mount 2
|
|
|
|
for details.
|
2001-07-09 06:47:10 +00:00
|
|
|
.Pp
|
2001-07-11 10:31:49 +00:00
|
|
|
.Dv MNT_EXPORTED , MNT_NOSUID , MNT_NODEV , MNT_UPDATE , MNT_RELOAD ,
|
|
|
|
.Dv MNT_FORCE , MNT_ASYNC , MNT_SYNCHRONOUS , MNT_UNION , MNT_NOATIME ,
|
|
|
|
.Dv MNT_SNAPSHOT , MNT_NOCLUSTERR , MNT_NOCLUSTERW , MNT_IGNORE ,
|
2001-07-13 08:14:54 +00:00
|
|
|
.Dv MNT_UNION , MNT_NOSYMFOLLOW
|
2001-07-11 10:31:49 +00:00
|
|
|
.It Fa fsdata
|
|
|
|
Filesystem specific data structure.
|
|
|
|
It is in userspace
|
2001-07-09 06:47:10 +00:00
|
|
|
when passed to
|
2001-07-11 10:31:49 +00:00
|
|
|
.Fn vfs_mount
|
2001-07-13 08:14:54 +00:00
|
|
|
and is left untouched when passed to filesystem's
|
2001-07-11 10:31:49 +00:00
|
|
|
.Fn mount .
|
2001-07-09 06:47:10 +00:00
|
|
|
.El
|
|
|
|
.Sh RETURN VALUES
|
2001-07-11 10:31:49 +00:00
|
|
|
A 0 value is returned on success.
|
2001-07-09 06:47:10 +00:00
|
|
|
.Sh ERRORS
|
|
|
|
.Bl -tag -width Er
|
|
|
|
.It Bq Er ENAMETOOLONG
|
|
|
|
The fs type or the mount point path is too long or any individual
|
|
|
|
path component is too long.
|
|
|
|
.It Bq Er EPERM
|
2001-07-11 10:31:49 +00:00
|
|
|
Permission denied.
|
|
|
|
There are a number of reason this can occur
|
2001-07-09 06:47:10 +00:00
|
|
|
ranging from the user not having permission to mount a filesystem
|
2001-07-11 10:31:49 +00:00
|
|
|
to the securelevel being to high to load the
|
|
|
|
.Fa fstype
|
|
|
|
module.
|
2001-07-09 06:47:10 +00:00
|
|
|
.It Bq Er EINVAL
|
|
|
|
Invalid operation (ex: trying to update a non mount-point).
|
|
|
|
.It Bq Er ENOENT
|
2001-07-11 10:31:49 +00:00
|
|
|
The mount point does not exist (from
|
|
|
|
.Fn namei ) .
|
2001-07-09 06:47:10 +00:00
|
|
|
.It Bq Er ELOOP
|
2001-07-11 10:31:49 +00:00
|
|
|
The mount point is a muddle of links (from
|
|
|
|
.Fn namei ) .
|
2001-07-09 06:47:10 +00:00
|
|
|
.It Bq Er EOPNOTSUPP
|
2001-07-11 10:31:49 +00:00
|
|
|
The operation is not supported (ex: reloading a r/w filesystem).
|
2001-07-09 06:47:10 +00:00
|
|
|
.It Bq Er EBUSY
|
2001-07-11 10:31:49 +00:00
|
|
|
The mount point is busy or is not really a mount point (on update).
|
2001-07-09 06:47:10 +00:00
|
|
|
.It Bq Er ENOTDIR
|
2001-07-11 10:31:49 +00:00
|
|
|
The mount point is not a directory.
|
2001-07-09 06:47:10 +00:00
|
|
|
.It Bq Er ENODEV
|
2001-07-11 10:31:49 +00:00
|
|
|
The kernel linker was unable to load the specified
|
|
|
|
.Fa fstype
|
|
|
|
or was unable to find the specified
|
|
|
|
.Fa fstype
|
|
|
|
module.
|
|
|
|
.El
|
2001-07-09 06:47:10 +00:00
|
|
|
.Pp
|
2001-07-13 08:14:54 +00:00
|
|
|
Other errors can be returned by the filesystem's
|
2001-07-11 10:31:49 +00:00
|
|
|
.Fn mount
|
|
|
|
and
|
|
|
|
you should check the specific filesystem for details.
|
|
|
|
Also
|
2001-07-09 06:47:10 +00:00
|
|
|
this call relies on a large number of other kernel services
|
2001-07-13 08:14:54 +00:00
|
|
|
whose errors it returns so this list may not be exhaustive.
|
2001-07-09 06:47:10 +00:00
|
|
|
.Sh SEE ALSO
|
2001-07-11 10:31:49 +00:00
|
|
|
.Xr mount 2 ,
|
2001-12-03 00:25:04 +00:00
|
|
|
.Xr mount 8 ,
|
2001-12-08 16:06:02 +00:00
|
|
|
.Xr vfs_mountedon 9
|
2001-07-11 10:31:49 +00:00
|
|
|
.Pp
|
|
|
|
.Va vfs.usermount
|
2001-07-09 06:47:10 +00:00
|
|
|
.Sh AUTHORS
|
2001-07-11 10:31:49 +00:00
|
|
|
This man page was written by
|
2001-07-13 08:14:54 +00:00
|
|
|
.An Chad David Aq davidc@acns.ab.ca .
|