xref: /netbsd/lib/libperfuse/libperfuse.3 (revision 67ea026a)
1.\" $NetBSD: libperfuse.3,v 1.7 2019/09/08 11:34:56 uwe Exp $
2.\"
3.\" Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
15.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
16.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
18.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24.\" POSSIBILITY OF SUCH DAMAGE.
25.\"
26.Dd January 23, 2019
27.Dt LIBPERFUSE 3
28.Os
29.Sh NAME
30.Nm perfuse_mount ,
31.Nm perfuse_open
32.Nd Request a
33.Xr puffs 3
34mount from
35.Xr perfused 8
36.Sh LIBRARY
37.Lb libperfuse
38.Sh SYNOPSIS
39.In perfuse.h
40.Ft int
41.Fn perfuse_mount "const char *source" "const char *dir" "const char *filesystemtype" "long int mountflags" "void *data"
42.Ft int
43.Fn perfuse_open "const char *path" "int flags"
44.Sh DESCRIPTION
45.Fn perfuse_mount
46sends a mount request to
47.Xr perfused 8 .
48It is intended as a drop-in replacement for
49.Xr mount 2
50for FUSE file systems daemons and libraries, so that they can work with
51.Xr perfused 8 .
52.Pp
53The function prototype mimics Linux's
54.Xr mount 2 ,
55with the following arguments:
56.Bl -tag -width Ar
57.It Ar source
58The source file system that will appear in
59.Xr df 1
60and
61.Xr mount 8
62listings.
63Defaults to
64.Pa /dev/fuse
65if
66.Dv NULL .
67.It Ar dir
68The file system mount point.
69.It Ar filesystemtype
70The file system type, as displayed by
71.Xr df 1
72and
73.Xr mount 8 .
74Defaults to
75.Qq Li fuse
76if
77.Dv NULL .
78.It Ar mountflags
79This contains the same value as a
80.Xr mount 2
81.Ar flags
82argument.
83.It Ar data
84This contains the same value as a
85.Xr mount 2
86.Ar data
87argument.
88.El
89.Pp
90.Fn perfuse_open
91is a drop-in replacement for the
92.Xr open 2
93system call where
94.Pa /dev/fuse
95is used.
96If
97.Ar path
98is different than
99.Pa /dev/fuse ,
100.Fn perfuse_open
101handles control to the regular
102.Xr open 2 .
103.Sh RETURN VALUES
104.Fn perfuse_mount
105returns a file descriptor to the
106.Pa /dev/fuse
107socket on success, and causes exit on failure.
108.Sh ENVIRONMENT
109.Bl -tag -width Ev
110.It Ev PERFUSE_OPTIONS
111Comma-separated values controlling the usage of some FUSE methods.
112Allowed values are
113.Li enable_access ,
114.Li disable_access ,
115.Li enable_creat ,
116.Li disable_creat .
117.It Ev PERFUSE_BUFSIZE
118Set the socket buffer sizes used for communication with the filesystem.
119This should be raised as operation throughput requires it.
120Default is
121.Li 2162688
122bytes, which is enough to queue 16 FUSE packets of maximum 132 kB length.
123.El
124.\".Sh ERRORS
125.\".Fn perfuse_mount
126.\"will fail when one of the following occurs:
127.\".Bl -tag -width Er
128.\".El
129.Sh SEE ALSO
130.Xr df 1 ,
131.Xr mount 2 ,
132.Xr open 2 ,
133.Xr puffs 3 ,
134.Xr mount 8 ,
135.Xr perfused 8
136.Sh AUTHORS
137The program was written by
138.An Emmanuel Dreyfus
139.Aq manu@NetBSD.org .
140