summaryrefslogtreecommitdiff
path: root/static/netbsd/man3/libperfuse.3
blob: f5081fcc5d8578edeb89b8ee20c1f14e3d76c82e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
.\" $NetBSD: libperfuse.3,v 1.7 2019/09/08 11:34:56 uwe Exp $
.\"
.\" Copyright (c) 2010 Emmanuel Dreyfus. 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, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``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 FOUNDATION OR CONTRIBUTORS
.\" 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.
.\"
.Dd January 23, 2019
.Dt LIBPERFUSE 3
.Os
.Sh NAME
.Nm perfuse_mount ,
.Nm perfuse_open
.Nd Request a
.Xr puffs 3
mount from
.Xr perfused 8
.Sh LIBRARY
.Lb libperfuse
.Sh SYNOPSIS
.In perfuse.h
.Ft int
.Fn perfuse_mount "const char *source" "const char *dir" "const char *filesystemtype" "long int mountflags" "void *data"
.Ft int
.Fn perfuse_open "const char *path" "int flags"
.Sh DESCRIPTION
.Fn perfuse_mount
sends a mount request to
.Xr perfused 8 .
It is intended as a drop-in replacement for
.Xr mount 2
for FUSE file systems daemons and libraries, so that they can work with
.Xr perfused 8 .
.Pp
The function prototype mimics Linux's
.Xr mount 2 ,
with the following arguments:
.Bl -tag -width Ar
.It Ar source
The source file system that will appear in
.Xr df 1
and
.Xr mount 8
listings.
Defaults to
.Pa /dev/fuse
if
.Dv NULL .
.It Ar dir
The file system mount point.
.It Ar filesystemtype
The file system type, as displayed by
.Xr df 1
and
.Xr mount 8 .
Defaults to
.Qq Li fuse
if
.Dv NULL .
.It Ar mountflags
This contains the same value as a
.Xr mount 2
.Ar flags
argument.
.It Ar data
This contains the same value as a
.Xr mount 2
.Ar data
argument.
.El
.Pp
.Fn perfuse_open
is a drop-in replacement for the
.Xr open 2
system call where
.Pa /dev/fuse
is used.
If
.Ar path
is different than
.Pa /dev/fuse ,
.Fn perfuse_open
handles control to the regular
.Xr open 2 .
.Sh RETURN VALUES
.Fn perfuse_mount
returns a file descriptor to the
.Pa /dev/fuse
socket on success, and causes exit on failure.
.Sh ENVIRONMENT
.Bl -tag -width Ev
.It Ev PERFUSE_OPTIONS
Comma-separated values controlling the usage of some FUSE methods.
Allowed values are
.Li enable_access ,
.Li disable_access ,
.Li enable_creat ,
.Li disable_creat .
.It Ev PERFUSE_BUFSIZE
Set the socket buffer sizes used for communication with the filesystem.
This should be raised as operation throughput requires it.
Default is
.Li 2162688
bytes, which is enough to queue 16 FUSE packets of maximum 132 kB length.
.El
.\".Sh ERRORS
.\".Fn perfuse_mount
.\"will fail when one of the following occurs:
.\".Bl -tag -width Er
.\".El
.Sh SEE ALSO
.Xr df 1 ,
.Xr mount 2 ,
.Xr open 2 ,
.Xr puffs 3 ,
.Xr mount 8 ,
.Xr perfused 8
.Sh AUTHORS
The program was written by
.An Emmanuel Dreyfus
.Aq manu@NetBSD.org .