xref: /netbsd-src/lib/librefuse/refuse.3 (revision 6bd7c569be2ac4e38e86be458ba344f0f9420d5b)
1.\"	$NetBSD: refuse.3,v 1.15 2019/04/11 06:18:43 wiz Exp $
2.\"
3.\" Copyright � 2007 Alistair Crooks.  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.\" 3. The name of the author may not be used to endorse or promote
14.\"    products derived from this software without specific prior written
15.\"    permission.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
21.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
23.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26.\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27.\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28.\"
29.Dd April 11, 2019
30.Dt REFUSE 3
31.Os
32.Sh NAME
33.Nm refuse
34.Nd Re-implementation of a file system in userspace system
35.Sh LIBRARY
36.Lb librefuse
37.Sh SYNOPSIS
38.In fuse.h
39.Ft int
40.Fo fuse_main
41.Fa "int argc" "char **argv" "const struct fuse_operations *"
42.Fc
43.Ft struct fuse_args
44.Fo FUSE_ARGS_INIT
45.Fa "int argc" "char **argv"
46.Fc
47.Ft struct fuse_opt
48.Fo FUSE_OPT_KEY
49.Fa "const char* templ" "int32_t key"
50.Fc
51.Vt struct fuse_opt Dv FUSE_OPT_END ;
52.Vt int32_t Dv FUSE_OPT_KEY_OPT ;
53.Vt int32_t Dv FUSE_OPT_KEY_NONOPT ;
54.Vt int32_t Dv FUSE_OPT_KEY_KEEP ;
55.Vt int32_t Dv FUSE_OPT_KEY_DISCARD ;
56.Ft int
57.Fo fuse_opt_add_arg
58.Fa "struct fuse_args *args" "const char *arg"
59.Fc
60.Ft int
61.Fo fuse_opt_add_opt
62.Fa "char **opts" "const char *opt"
63.Fc
64.Ft int
65.Fo fuse_opt_add_opt_escaped
66.Fa "char **opts" "const char *opt"
67.Fc
68.Ft void
69.Fo fuse_opt_free_args
70.Fa "struct fuse_args *args"
71.Fc
72.Ft int
73.Fo fuse_opt_insert_arg
74.Fa "struct fuse_args *args" "int pos" "const char *arg"
75.Fc
76.Ft int
77.Fo fuse_opt_match
78.Fa "const struct fuse_opt *opts" "const char *opt"
79.Fc
80.Ft int
81.Fo fuse_opt_parse
82.Fa "struct fuse_args *args" "void *userdata"
83.Fa "const struct fuse_opt *descriptions" "fuse_opt_proc_t processingfunc"
84.Fc
85.Ft int
86.Fo fuse_new
87.Fa "struct fuse_args *args" "const struct fuse_operations *ops"
88.Fa "size_t opssize" "void *userdata"
89.Fc
90.Ft int
91.Fo fuse_mount
92.Fa "struct fuse *fuse" "const char *mountpoint"
93.Fc
94.Ft int
95.Fo fuse_unmount
96.Fa "struct fuse* fuse"
97.Fc
98.Ft int
99.Fo fuse_daemonize
100.Fa "struct fuse *fuse"
101.Fc
102.Ft int
103.Fo fuse_version
104.Fa "struct fuse *fuse"
105.Fc
106.Ft int
107.Fo puffs_fuse_node_getattr
108.Fa "const char *path" "struct stat *attrs"
109.Fc
110.Ft int
111.Fo puffs_fuse_node_readlink
112.Fa "const char *path" "char *output" "size_t outlen"
113.Fc
114.Ft int
115.Fo puffs_fuse_node_mknod
116.Fa "const char *path" "mode_t permissions" "dev_t devicenumber"
117.Fc
118.Ft int
119.Fo puffs_fuse_node_mkdir
120.Fa "const char *path" "mode_t permissions"
121.Fc
122.Ft int
123.Fo puffs_fuse_unlink
124.Fa "const char *path"
125.Fc
126.Ft int
127.Fo puffs_fuse_node_rmdir
128.Fa "const char *path"
129.Fc
130.Ft int
131.Fo puffs_fuse_node_symlink
132.Fa "const char *path" "const char *target"
133.Fc
134.Ft int
135.Fo puffs_fuse_node_rename
136.Fa "const char *from" "const char *to"
137.Fc
138.Ft int
139.Fo puffs_fuse_node_link
140.Fa "const char *from" "const char *to"
141.Fc
142.Ft int
143.Fo puffs_fuse_node_chmod
144.Fa "const char *path" "mode_t permissions"
145.Fc
146.Ft int
147.Fo puffs_fuse_node_own
148.Fa "const char *path" "uid_t owner" "gid_t group"
149.Fc
150.Ft int
151.Fo puffs_fuse_node_truncate
152.Fa "const char *path" "off_t newsize"
153.Fc
154.Ft int
155.Fo puffs_fuse_node_utime
156.Fa "const char *path" "struct utimbuf *newtimes"
157.Fc
158.Ft int
159.Fo puffs_fuse_node_open
160.Fa "const char *path" "struct fuse_file_info *fileinfo"
161.Fc
162.Ft int
163.Fo puffs_fuse_node_read
164.Fa "const char *path" "char *buffer" "size_t bufferlen" "off_t startoffset"
165.Fa "struct fuse_file_info *fileinfo"
166.Fc
167.Ft int
168.Fo puffs_fuse_node_write
169.Fa "const char *path" "char *buffer" "size_t bufferlen" "off_t startoffset"
170.Fa "struct fuse_file_info *fileinfo"
171.Fc
172.Ft int
173.Fo puffs_fuse_fs_statfs
174.Fa "const char *path" "struct statvfs *vfsinfo"
175.Fc
176.Ft int
177.Fo puffs_fuse_node_flush
178.Fa "const char *path" "struct fuse_file_info *fileinfo"
179.Fc
180.Ft int
181.Fo puffs_fuse_node_fsync
182.Fa "const char *path" "int flags" "struct fuse_file_info *fileinfo"
183.Fc
184.Ft int
185.Fo puffs_fuse_node_setxattr
186.Fa "const char *path" "const char *attrname" "const char *attrvalue"
187.Fa "size_t attrsize" "int flags"
188.Fc
189.Ft int
190.Fo puffs_fuse_node_getxattr
191.Fa "const char *path" "const char *attrname" "const char *attrvalue"
192.Fa "size_t attrvaluesize"
193.Fc
194.Ft int
195.Fo puffs_fuse_node_listxattr
196.Fa "const char *path" "const char *attrname"
197.Fa "size_t attrvaluesize"
198.Fc
199.Ft int
200.Fo puffs_fuse_node_removexattr
201.Fa "const char *path" "const char *attrname"
202.Fc
203.Ft int
204.Fo puffs_fuse_node_opendir
205.Fa "const char *path" "struct fuse_file_info *fileinfo"
206.Fc
207.Ft int
208.Fo puffs_fuse_node_readdir
209.Fa "const char *path" "void *data" "fuse_fill_dir_t fillinfo"
210.Fa "off_t offset" "struct fuse_file_info *fileinfo"
211.Fc
212.Ft int
213.Fo puffs_fuse_node_releasedir
214.Fa "const char *path" "struct fuse_file_info *fileinfo"
215.Fc
216.Ft int
217.Fo puffs_fuse_node_fsyncdir
218.Fa "const char *path" "int flags" "struct fuse_file_info *fileinfo"
219.Fc
220.Ft void *
221.Fo puffs_fuse_fs_init
222.Fa "struct fuse_conn_info *connectioninfo"
223.Fc
224.Ft void
225.Fo puffs_fuse_node_destroy
226.Fa "void *connection"
227.Fc
228.Ft int
229.Fo puffs_fuse_node_access
230.Fa "const char *path" "int accesstype"
231.Fc
232.Ft int
233.Fo puffs_fuse_node_create
234.Fa "const char *path" "mode_t permissions" "struct fuse_file_info *fileinfo"
235.Fc
236.Ft int
237.Fo puffs_fuse_node_ftruncate
238.Fa "const char *path" "off_t offset" "struct fuse_file_info *fileinfo"
239.Fc
240.Ft int
241.Fo puffs_fuse_node_fgetattr
242.Fa "const char *path" "struct stat *attrs" "struct fuse_file_info *fileinfo"
243.Fc
244.Ft int
245.Fo puffs_fuse_node_lock
246.Fa "const char *path" "struct fuse_file_info *fileinfo"
247.Fa "int locktype" "struct flock *lockinfo"
248.Fc
249.Ft int
250.Fo puffs_fuse_node_utimens
251.Fa "const char *path" "const struct timespec *newtimes"
252.Fc
253.Ft int
254.Fo puffs_fuse_node_bmap
255.Fa "const char *path" "size_t mapsize" "uint64_t offset"
256.Fc
257.Sh DESCRIPTION
258.Nm
259is a reimplementation of the file system in user space subsystem.
260Operations are transported from the kernel virtual file system layer
261to the concrete implementation behind
262.Nm ,
263where they are processed and results are sent back to the kernel.
264.Pp
265It uses the framework provided by the
266.Xr puffs 3
267subsystem, and, through that, the kernel interface provided by
268.Xr puffs 4 .
269.Sh SEE ALSO
270.Xr puffs 3 ,
271.Xr puffs 4
272.Rs
273.%A Antti Kantee
274.%A Alistair Crooks
275.%D September 2007
276.%J EuroBSDCon 2007
277.%T ReFUSE: Userspace FUSE Reimplementation Using puffs
278.Re
279.Sh HISTORY
280An unsupported experimental version of
281.Nm
282first appeared in
283.Nx 5.0 .
284.Sh AUTHORS
285.An Alistair Crooks Aq Mt agc@NetBSD.org ,
286.An Antti Kantee Aq Mt pooka@NetBSD.org
287.Sh BUGS
288Many, legion, but well-loved.
289