xref: /freebsd/share/man/man9/VFS_SET.9 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
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.\"
27*284001a2SJamie Gritton.Dd August 16, 2018
28ffc0b97fSAlfred Perlstein.Dt VFS_SET 9
29ffc0b97fSAlfred Perlstein.Os
30ffc0b97fSAlfred Perlstein.Sh NAME
31ffc0b97fSAlfred Perlstein.Nm VFS_SET
32af29f9a2SRuslan Ermilov.Nd set up loadable file system
33af29f9a2SRuslan Ermilov.Vt vfsconf
34ffc0b97fSAlfred Perlstein.Sh SYNOPSIS
35ffc0b97fSAlfred Perlstein.In sys/param.h
36f16b3c0dSChad David.In sys/kernel.h
37f16b3c0dSChad David.In sys/module.h
38ffc0b97fSAlfred Perlstein.In sys/mount.h
39ffc0b97fSAlfred Perlstein.Ft void
40f16b3c0dSChad David.Fn VFS_SET "struct vfsops *vfsops" "fsname" "int flags"
41ffc0b97fSAlfred Perlstein.Sh DESCRIPTION
42ffc0b97fSAlfred Perlstein.Fn VFS_SET
43af29f9a2SRuslan Ermilovcreates a
44af29f9a2SRuslan Ermilov.Vt vfsconf
45af29f9a2SRuslan Ermilovstructure for the loadable module with the given
46af29f9a2SRuslan Ermilov.Fa vfsops , fsname
47af29f9a2SRuslan Ermilovand
48af29f9a2SRuslan Ermilov.Fa flags ,
49af29f9a2SRuslan Ermilovand declares it by calling
50af29f9a2SRuslan Ermilov.Xr DECLARE_MODULE 9
51ffc0b97fSAlfred Perlsteinusing
52ffc0b97fSAlfred Perlstein.Fn vfs_modevent
53ffc0b97fSAlfred Perlsteinas the event handler.
5430ecad6fSHiten Pandya.Pp
5530ecad6fSHiten PandyaPossible values for the
5630ecad6fSHiten Pandya.Fa flags
575cd9afadSGiorgos Keramidasargument are:
581ba4a712SPawel Jakub Dawidek.Bl -hang -width ".Dv VFCF_DELEGADMIN"
5930ecad6fSHiten Pandya.It Dv VFCF_STATIC
6030ecad6fSHiten PandyaFile system should be statically available in the kernel.
6130ecad6fSHiten Pandya.It Dv VFCF_NETWORK
6230ecad6fSHiten PandyaNetwork exportable file system.
6330ecad6fSHiten Pandya.It Dv VFCF_READONLY
6430ecad6fSHiten PandyaDoes not support write operations.
6530ecad6fSHiten Pandya.It Dv VFCF_SYNTHETIC
6630ecad6fSHiten PandyaPseudo file system, data does not represent on-disk files.
6730ecad6fSHiten Pandya.It Dv VFCF_LOOPBACK
6830ecad6fSHiten PandyaLoopback file system layer.
6930ecad6fSHiten Pandya.It Dv VFCF_UNICODE
7030ecad6fSHiten PandyaFile names are stored as Unicode.
71f3a8d2f9SPawel Jakub Dawidek.It Dv VFCF_JAIL
721ba4a712SPawel Jakub DawidekCan be mounted from within a jail if
73*284001a2SJamie Gritton.Va allow.mount
74*284001a2SJamie Grittonand
75*284001a2SJamie Gritton.Va allow.mount.<fsname>
76*284001a2SJamie Grittonjail parameters are set.
771ba4a712SPawel Jakub Dawidek.It Dv VFCF_DELEGADMIN
781ba4a712SPawel Jakub DawidekSupports delegated administration if
791ba4a712SPawel Jakub Dawidek.Va vfs.usermount
801ba4a712SPawel Jakub Dawideksysctl is set to
811ba4a712SPawel Jakub Dawidek.Dv 1 .
825e0fb005SSergey Kandaurov.It Dv VFCF_SBDRY
835e0fb005SSergey KandaurovWhen in VFS method, the thread suspension is deferred to the user
845e0fb005SSergey Kandaurovboundary upon arrival of stop action.
8530ecad6fSHiten Pandya.El
86ffc0b97fSAlfred Perlstein.Sh PSEUDOCODE
87ffc0b97fSAlfred Perlstein.Bd -literal
88ffc0b97fSAlfred Perlstein/*
898ffbf27dSSergey Kandaurov * Fill in the fields for which we have special methods.
908ffbf27dSSergey Kandaurov * The others are initially null.  This tells vfs to change them to
918ffbf27dSSergey Kandaurov * pointers to vfs_std* functions during file system registration.
92ffc0b97fSAlfred Perlstein */
93ffc0b97fSAlfred Perlsteinstatic struct vfsops myfs_vfsops = {
94dbfee063SSergey Kandaurov        .vfs_mount =    myfs_mount,
95dbfee063SSergey Kandaurov        .vfs_root =     myfs_root,
96dbfee063SSergey Kandaurov        .vfs_statfs =   myfs_statfs,
97dbfee063SSergey Kandaurov        .vfs_unmount =  myfs_unmount,
98ffc0b97fSAlfred Perlstein};
99ffc0b97fSAlfred Perlstein
100dbfee063SSergey KandaurovVFS_SET(myfs_vfsops, myfs, 0);
101ffc0b97fSAlfred Perlstein.Ed
102ffc0b97fSAlfred Perlstein.Sh SEE ALSO
103f3a8d2f9SPawel Jakub Dawidek.Xr jail 2 ,
104f3a8d2f9SPawel Jakub Dawidek.Xr jail 8 ,
105af29f9a2SRuslan Ermilov.Xr DECLARE_MODULE 9 ,
1061e9469d1SChristian Brueffer.Xr vfs_modevent 9 ,
1071e9469d1SChristian Brueffer.Xr vfsconf 9
108ffc0b97fSAlfred Perlstein.Sh AUTHORS
10909356c84SHiten PandyaThis manual page was written by
1108a7314fcSBaptiste Daroussin.An Chad David Aq Mt davidc@acns.ab.ca .
111