xref: /dflybsd-src/share/man/man5/dirfs.5 (revision b0a405db534ead54c6e9811b89d9b262c3280011)
1509bc517SAntonio Huete Jimenez.\"
2509bc517SAntonio Huete Jimenez.\" Copyright (c) 2013 Antonio Huete Jimenez <tuxillo@quantumachine.net>
3509bc517SAntonio Huete Jimenez.\" All rights reserved.
4509bc517SAntonio Huete Jimenez.\"
5509bc517SAntonio Huete Jimenez.\" Redistribution and use in source and binary forms, with or without
6509bc517SAntonio Huete Jimenez.\" modification, are permitted provided that the following conditions
7509bc517SAntonio Huete Jimenez.\" are met:
8509bc517SAntonio Huete Jimenez.\" 1. Redistributions of source code must retain the above copyright
9509bc517SAntonio Huete Jimenez.\"    notice, this list of conditions and the following disclaimer.
10509bc517SAntonio Huete Jimenez.\" 2. Redistributions in binary form must reproduce the above copyright
11509bc517SAntonio Huete Jimenez.\"    notice, this list of conditions and the following disclaimer in the
12509bc517SAntonio Huete Jimenez.\"    documentation and/or other materials provided with the distribution.
13509bc517SAntonio Huete Jimenez.\" 3. The name of the author may not be used to endorse or promote products
14509bc517SAntonio Huete Jimenez.\"    derived from this software without specific prior written permission
15509bc517SAntonio Huete Jimenez.\"
16509bc517SAntonio Huete Jimenez.\" THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17509bc517SAntonio Huete Jimenez.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18509bc517SAntonio Huete Jimenez.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19509bc517SAntonio Huete Jimenez.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20509bc517SAntonio Huete Jimenez.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21509bc517SAntonio Huete Jimenez.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22509bc517SAntonio Huete Jimenez.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23509bc517SAntonio Huete Jimenez.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24509bc517SAntonio Huete Jimenez.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25509bc517SAntonio Huete Jimenez.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26509bc517SAntonio Huete Jimenez.\"
27509bc517SAntonio Huete Jimenez.\"
28509bc517SAntonio Huete Jimenez.Dd September 5, 2013
29509bc517SAntonio Huete Jimenez.Dt DIRFS 5
30509bc517SAntonio Huete Jimenez.Os
31509bc517SAntonio Huete Jimenez.Sh NAME
32509bc517SAntonio Huete Jimenez.Nm dirfs
33509bc517SAntonio Huete Jimenez.Nd "pseudo-filesystem for vkernel"
34509bc517SAntonio Huete Jimenez.Sh SYNOPSIS
35509bc517SAntonio Huete JimenezTo compile this driver into the vkernel,
36509bc517SAntonio Huete Jimenezplace the following line in your
37509bc517SAntonio Huete Jimenezvkernel configuration file:
38509bc517SAntonio Huete Jimenez.Bd -ragged -offset indent
39509bc517SAntonio Huete Jimenez.Cd "options DIRFS"
40509bc517SAntonio Huete Jimenez.Ed
41509bc517SAntonio Huete Jimenez.Pp
42509bc517SAntonio Huete JimenezActually this driver does not provide a loadable module.
43509bc517SAntonio Huete Jimenez.Pp
44509bc517SAntonio Huete JimenezIn
45509bc517SAntonio Huete Jimenez.Xr fstab 5 :
46509bc517SAntonio Huete Jimenez.Bd -literal -compact
47509bc517SAntonio Huete Jimenez/usr/src     /mnt dirfs rw 0 0
4884a0c77eSSascha Wildner.Ed
49509bc517SAntonio Huete Jimenez.Sh DESCRIPTION
50509bc517SAntonio Huete Jimenez.Nm
51509bc517SAntonio Huete Jimenezwas born from the idea of providing an easy way for
52509bc517SAntonio Huete Jimenez.Xr vkernel 7
53509bc517SAntonio Huete Jimenezto access host's directories without any sort of configuration as it would be
54509bc517SAntonio Huete Jimenezneeded by NFS for example.
55509bc517SAntonio Huete Jimenez.Pp
56509bc517SAntonio Huete JimenezIt runs directly in the vkernel's
57509bc517SAntonio Huete Jimenez.Xr VFS 9
58509bc517SAntonio Huete Jimenezcode, as any other regular filesystem but it uses syscalls to retrieve the
59509bc517SAntonio Huete Jimenezinformation needed for every operation requested.
60509bc517SAntonio Huete Jimenez.Pp
61509bc517SAntonio Huete JimenezIt should be noted that when the vkernel is run by a regular user, the
62509bc517SAntonio Huete Jimenezoperations
63509bc517SAntonio Huete Jimenez.Nm
64509bc517SAntonio Huete Jimenezcan perform on the mounted host directory are bound to the permissions of
65509bc517SAntonio Huete Jimenezthe aforementioned user.
66509bc517SAntonio Huete Jimenez.Pp
67509bc517SAntonio Huete JimenezMultiple
68509bc517SAntonio Huete Jimenez.Nm
69509bc517SAntonio Huete Jimenezmounts are allowed.
70509bc517SAntonio Huete Jimenez.Sh EXAMPLES
71509bc517SAntonio Huete JimenezTo mount a
72509bc517SAntonio Huete Jimenez.Nm
73509bc517SAntonio Huete Jimenezmemory file system:
74509bc517SAntonio Huete Jimenez.Pp
75509bc517SAntonio Huete Jimenez.Dl "mount -t dirfs /usr/src /mnt"
76509bc517SAntonio Huete Jimenez.Sh SEE ALSO
77509bc517SAntonio Huete Jimenez.Xr fstab 5 ,
78*b0a405dbSSascha Wildner.Xr mount_dirfs 8
79509bc517SAntonio Huete Jimenez.Sh HISTORY
80509bc517SAntonio Huete JimenezThe
81509bc517SAntonio Huete Jimenez.Nm
82509bc517SAntonio Huete Jimenezdriver first appeared in
83509bc517SAntonio Huete Jimenez.Dx 3.5 .
84509bc517SAntonio Huete Jimenez.Sh AUTHORS
85509bc517SAntonio Huete Jimenez.An -nosplit
86509bc517SAntonio Huete JimenezThe
87509bc517SAntonio Huete Jimenez.Nm
88509bc517SAntonio Huete Jimenezvkernel implementation was written from the scratch by
89509bc517SAntonio Huete Jimenez.An Antonio Huete Jimenez Aq Mt tuxillo@quantumachine.net
90509bc517SAntonio Huete Jimenez.Pp
91509bc517SAntonio Huete JimenezNumerous fixes and pointers by
92509bc517SAntonio Huete Jimenez.An Matthew Dillon Aq Mt dillon@apollo.backplane.com
93509bc517SAntonio Huete Jimenez.Pp
94509bc517SAntonio Huete JimenezThis manual page was written by
95509bc517SAntonio Huete Jimenez.An Antonio Huete Jimenez Aq Mt tuxillo@quantumachine.net
96509bc517SAntonio Huete Jimenez.Sh BUGS
97509bc517SAntonio Huete JimenezCurrently there is no locking on file descriptors between the host
98509bc517SAntonio Huete Jimenezand the vkernel.
99509bc517SAntonio Huete JimenezThis means that there might be problems with concurrent accesses to the same
100509bc517SAntonio Huete Jimenezfile.
101509bc517SAntonio Huete Jimenez.Pp
102509bc517SAntonio Huete JimenezThere is no support for hardlinks in
103509bc517SAntonio Huete Jimenez.Nm
104509bc517SAntonio Huete Jimenezyet.
105