xref: /freebsd/share/man/man9/VFS_SET.9 (revision 8a7314fcb5347f8296a072e0c4f67a9f64303186)
1ffc0b97fSAlfred Perlstein.\"
2ffc0b97fSAlfred Perlstein.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved.
3ffc0b97fSAlfred Perlstein.\"
4ffc0b97fSAlfred Perlstein.\" Redistribution and use in source and binary forms, with or without
5ffc0b97fSAlfred Perlstein.\" modification, are permitted provided that the following conditions
6ffc0b97fSAlfred Perlstein.\" are met:
7ffc0b97fSAlfred Perlstein.\" 1. Redistributions of source code must retain the above copyright
8ffc0b97fSAlfred Perlstein.\"    notice(s), this list of conditions and the following disclaimer as
9ffc0b97fSAlfred Perlstein.\"    the first lines of this file unmodified other than the possible
10ffc0b97fSAlfred Perlstein.\"    addition of one or more copyright notices.
11ffc0b97fSAlfred Perlstein.\" 2. Redistributions in binary form must reproduce the above copyright
12ffc0b97fSAlfred Perlstein.\"    notice(s), this list of conditions and the following disclaimer in the
13ffc0b97fSAlfred Perlstein.\"    documentation and/or other materials provided with the distribution.
14ffc0b97fSAlfred Perlstein.\"
15ffc0b97fSAlfred Perlstein.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
16ffc0b97fSAlfred Perlstein.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17ffc0b97fSAlfred Perlstein.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18ffc0b97fSAlfred Perlstein.\" DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
19ffc0b97fSAlfred Perlstein.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20ffc0b97fSAlfred Perlstein.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21ffc0b97fSAlfred Perlstein.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22ffc0b97fSAlfred Perlstein.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23ffc0b97fSAlfred Perlstein.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24ffc0b97fSAlfred Perlstein.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
25ffc0b97fSAlfred Perlstein.\" DAMAGE.
26ffc0b97fSAlfred Perlstein.\"
27ffc0b97fSAlfred Perlstein.\" $FreeBSD$
28ffc0b97fSAlfred Perlstein.\"
295e0fb005SSergey Kandaurov.Dd February 21, 2013
30ffc0b97fSAlfred Perlstein.Dt VFS_SET 9
31ffc0b97fSAlfred Perlstein.Os
32ffc0b97fSAlfred Perlstein.Sh NAME
33ffc0b97fSAlfred Perlstein.Nm VFS_SET
34af29f9a2SRuslan Ermilov.Nd set up loadable file system
35af29f9a2SRuslan Ermilov.Vt vfsconf
36ffc0b97fSAlfred Perlstein.Sh SYNOPSIS
37ffc0b97fSAlfred Perlstein.In sys/param.h
38f16b3c0dSChad David.In sys/kernel.h
39f16b3c0dSChad David.In sys/module.h
40ffc0b97fSAlfred Perlstein.In sys/mount.h
41ffc0b97fSAlfred Perlstein.Ft void
42f16b3c0dSChad David.Fn VFS_SET "struct vfsops *vfsops" "fsname" "int flags"
43ffc0b97fSAlfred Perlstein.Sh DESCRIPTION
44ffc0b97fSAlfred Perlstein.Fn VFS_SET
45af29f9a2SRuslan Ermilovcreates a
46af29f9a2SRuslan Ermilov.Vt vfsconf
47af29f9a2SRuslan Ermilovstructure for the loadable module with the given
48af29f9a2SRuslan Ermilov.Fa vfsops , fsname
49af29f9a2SRuslan Ermilovand
50af29f9a2SRuslan Ermilov.Fa flags ,
51af29f9a2SRuslan Ermilovand declares it by calling
52af29f9a2SRuslan Ermilov.Xr DECLARE_MODULE 9
53ffc0b97fSAlfred Perlsteinusing
54ffc0b97fSAlfred Perlstein.Fn vfs_modevent
55ffc0b97fSAlfred Perlsteinas the event handler.
5630ecad6fSHiten Pandya.Pp
5730ecad6fSHiten PandyaPossible values for the
5830ecad6fSHiten Pandya.Fa flags
595cd9afadSGiorgos Keramidasargument are:
601ba4a712SPawel Jakub Dawidek.Bl -hang -width ".Dv VFCF_DELEGADMIN"
6130ecad6fSHiten Pandya.It Dv VFCF_STATIC
6230ecad6fSHiten PandyaFile system should be statically available in the kernel.
6330ecad6fSHiten Pandya.It Dv VFCF_NETWORK
6430ecad6fSHiten PandyaNetwork exportable file system.
6530ecad6fSHiten Pandya.It Dv VFCF_READONLY
6630ecad6fSHiten PandyaDoes not support write operations.
6730ecad6fSHiten Pandya.It Dv VFCF_SYNTHETIC
6830ecad6fSHiten PandyaPseudo file system, data does not represent on-disk files.
6930ecad6fSHiten Pandya.It Dv VFCF_LOOPBACK
7030ecad6fSHiten PandyaLoopback file system layer.
7130ecad6fSHiten Pandya.It Dv VFCF_UNICODE
7230ecad6fSHiten PandyaFile names are stored as Unicode.
73f3a8d2f9SPawel Jakub Dawidek.It Dv VFCF_JAIL
741ba4a712SPawel Jakub DawidekCan be mounted from within a jail if
75f3a8d2f9SPawel Jakub Dawidek.Va security.jail.mount_allowed
76f3a8d2f9SPawel Jakub Dawideksysctl is set to
77f3a8d2f9SPawel Jakub Dawidek.Dv 1 .
781ba4a712SPawel Jakub Dawidek.It Dv VFCF_DELEGADMIN
791ba4a712SPawel Jakub DawidekSupports delegated administration if
801ba4a712SPawel Jakub Dawidek.Va vfs.usermount
811ba4a712SPawel Jakub Dawideksysctl is set to
821ba4a712SPawel Jakub Dawidek.Dv 1 .
835e0fb005SSergey Kandaurov.It Dv VFCF_SBDRY
845e0fb005SSergey KandaurovWhen in VFS method, the thread suspension is deferred to the user
855e0fb005SSergey Kandaurovboundary upon arrival of stop action.
8630ecad6fSHiten Pandya.El
87ffc0b97fSAlfred Perlstein.Sh PSEUDOCODE
88ffc0b97fSAlfred Perlstein.Bd -literal
89ffc0b97fSAlfred Perlstein/*
908ffbf27dSSergey Kandaurov * Fill in the fields for which we have special methods.
918ffbf27dSSergey Kandaurov * The others are initially null.  This tells vfs to change them to
928ffbf27dSSergey Kandaurov * pointers to vfs_std* functions during file system registration.
93ffc0b97fSAlfred Perlstein */
94ffc0b97fSAlfred Perlsteinstatic struct vfsops myfs_vfsops = {
95dbfee063SSergey Kandaurov        .vfs_mount =    myfs_mount,
96dbfee063SSergey Kandaurov        .vfs_root =     myfs_root,
97dbfee063SSergey Kandaurov        .vfs_statfs =   myfs_statfs,
98dbfee063SSergey Kandaurov        .vfs_unmount =  myfs_unmount,
99ffc0b97fSAlfred Perlstein};
100ffc0b97fSAlfred Perlstein
101dbfee063SSergey KandaurovVFS_SET(myfs_vfsops, myfs, 0);
102ffc0b97fSAlfred Perlstein.Ed
103ffc0b97fSAlfred Perlstein.Sh SEE ALSO
104f3a8d2f9SPawel Jakub Dawidek.Xr jail 2 ,
105f3a8d2f9SPawel Jakub Dawidek.Xr jail 8 ,
106af29f9a2SRuslan Ermilov.Xr DECLARE_MODULE 9 ,
107ffc0b97fSAlfred Perlstein.Xr vfsconf 9 ,
108af29f9a2SRuslan Ermilov.Xr vfs_modevent 9
109ffc0b97fSAlfred Perlstein.Sh AUTHORS
11009356c84SHiten PandyaThis manual page was written by
111*8a7314fcSBaptiste Daroussin.An Chad David Aq Mt davidc@acns.ab.ca .
112