1.\" $NetBSD: refuse.3,v 1.13 2016/11/20 13:28:32 pho 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 November 15, 2016 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 puffs_fuse_node_getattr 104.Fa "const char *path" "struct stat *attrs" 105.Fc 106.Ft int 107.Fo puffs_fuse_node_readlink 108.Fa "const char *path" "char *output" "size_t outlen" 109.Fc 110.Ft int 111.Fo puffs_fuse_node_mknod 112.Fa "const char *path" "mode_t permissions" "dev_t devicenumber" 113.Fc 114.Ft int 115.Fo puffs_fuse_node_mkdir 116.Fa "const char *path" "mode_t permissions" 117.Fc 118.Ft int 119.Fo puffs_fuse_unlink 120.Fa "const char *path" 121.Fc 122.Ft int 123.Fo puffs_fuse_node_rmdir 124.Fa "const char *path" 125.Fc 126.Ft int 127.Fo puffs_fuse_node_symlink 128.Fa "const char *path" "const char *target" 129.Fc 130.Ft int 131.Fo puffs_fuse_node_rename 132.Fa "const char *from" "const char *to" 133.Fc 134.Ft int 135.Fo puffs_fuse_node_link 136.Fa "const char *from" "const char *to" 137.Fc 138.Ft int 139.Fo puffs_fuse_node_chmod 140.Fa "const char *path" "mode_t permissions" 141.Fc 142.Ft int 143.Fo puffs_fuse_node_own 144.Fa "const char *path" "uid_t owner" "gid_t group" 145.Fc 146.Ft int 147.Fo puffs_fuse_node_truncate 148.Fa "const char *path" "off_t newsize" 149.Fc 150.Ft int 151.Fo puffs_fuse_node_utime 152.Fa "const char *path" "struct utimbuf *newtimes" 153.Fc 154.Ft int 155.Fo puffs_fuse_node_open 156.Fa "const char *path" "struct fuse_file_info *fileinfo" 157.Fc 158.Ft int 159.Fo puffs_fuse_node_read 160.Fa "const char *path" "char *buffer" "size_t bufferlen" "off_t startoffset" 161.Fa "struct fuse_file_info *fileinfo" 162.Fc 163.Ft int 164.Fo puffs_fuse_node_write 165.Fa "const char *path" "char *buffer" "size_t bufferlen" "off_t startoffset" 166.Fa "struct fuse_file_info *fileinfo" 167.Fc 168.Ft int 169.Fo puffs_fuse_fs_statfs 170.Fa "const char *path" "struct statvfs *vfsinfo" 171.Fc 172.Ft int 173.Fo puffs_fuse_node_flush 174.Fa "const char *path" "struct fuse_file_info *fileinfo" 175.Fc 176.Ft int 177.Fo puffs_fuse_node_fsync 178.Fa "const char *path" "int flags" "struct fuse_file_info *fileinfo" 179.Fc 180.Ft int 181.Fo puffs_fuse_node_setxattr 182.Fa "const char *path" "const char *attrname" "const char *attrvalue" 183.Fa "size_t attrsize" "int flags" 184.Fc 185.Ft int 186.Fo puffs_fuse_node_getxattr 187.Fa "const char *path" "const char *attrname" "const char *attrvalue" 188.Fa "size_t attrvaluesize" 189.Fc 190.Ft int 191.Fo puffs_fuse_node_listxattr 192.Fa "const char *path" "const char *attrname" 193.Fa "size_t attrvaluesize" 194.Fc 195.Ft int 196.Fo puffs_fuse_node_removexattr 197.Fa "const char *path" "const char *attrname" 198.Fc 199.Ft int 200.Fo puffs_fuse_node_opendir 201.Fa "const char *path" "struct fuse_file_info *fileinfo" 202.Fc 203.Ft int 204.Fo puffs_fuse_node_readdir 205.Fa "const char *path" "void *data" "fuse_fill_dir_t fillinfo" 206.Fa "off_t offset" "struct fuse_file_info *fileinfo" 207.Fc 208.Ft int 209.Fo puffs_fuse_node_releasedir 210.Fa "const char *path" "struct fuse_file_info *fileinfo" 211.Fc 212.Ft int 213.Fo puffs_fuse_node_fsyncdir 214.Fa "const char *path" "int flags" "struct fuse_file_info *fileinfo" 215.Fc 216.Ft void * 217.Fo puffs_fuse_fs_init 218.Fa "struct fuse_conn_info *connectioninfo" 219.Fc 220.Ft void 221.Fo puffs_fuse_node_destroy 222.Fa "void *connection" 223.Fc 224.Ft int 225.Fo puffs_fuse_node_access 226.Fa "const char *path" "int accesstype" 227.Fc 228.Ft int 229.Fo puffs_fuse_node_create 230.Fa "const char *path" "mode_t permissions" "struct fuse_file_info *fileinfo" 231.Fc 232.Ft int 233.Fo puffs_fuse_node_ftruncate 234.Fa "const char *path" "off_t offset" "struct fuse_file_info *fileinfo" 235.Fc 236.Ft int 237.Fo puffs_fuse_node_fgetattr 238.Fa "const char *path" "struct stat *attrs" "struct fuse_file_info *fileinfo" 239.Fc 240.Ft int 241.Fo puffs_fuse_node_lock 242.Fa "const char *path" "struct fuse_file_info *fileinfo" 243.Fa "int locktype" "struct flock *lockinfo" 244.Fc 245.Ft int 246.Fo puffs_fuse_node_utimens 247.Fa "const char *path" "const struct timespec *newtimes" 248.Fc 249.Ft int 250.Fo puffs_fuse_node_bmap 251.Fa "const char *path" "size_t mapsize" "uint64_t offset" 252.Fc 253.Sh DESCRIPTION 254.Nm 255is a reimplementation of the file system in user space subsystem. 256Operations are transported from the kernel virtual file system layer 257to the concrete implementation behind 258.Nm , 259where they are processed and results are sent back to the kernel. 260.Pp 261It uses the framework provided by the 262.Xr puffs 3 263subsystem, and, through that, the kernel interface provided by 264.Xr puffs 4 . 265.Sh SEE ALSO 266.Xr puffs 3 , 267.Xr puffs 4 268.Rs 269.%A Antti Kantee 270.%A Alistair Crooks 271.%D September 2007 272.%J EuroBSDCon 2007 273.%T ReFUSE: Userspace FUSE Reimplementation Using puffs 274.Re 275.Sh HISTORY 276An unsupported experimental version of 277.Nm 278first appeared in 279.Nx 5.0 . 280.Sh AUTHORS 281.An Alistair Crooks Aq Mt agc@NetBSD.org , 282.An Antti Kantee Aq Mt pooka@NetBSD.org 283.Sh BUGS 284Many, legion, but well-loved. 285