1.\" $NetBSD: refuse.3,v 1.9 2014/03/18 18:20:38 riastradh 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 30, 2007 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 int 44.Fo fuse_opt_add_arg 45.Fa "struct fuse_args *args" "const char *arg" 46.Fc 47.Ft int 48.Fo fuse_opt_parse 49.Fa "struct fuse_args *args" "void *userdata" 50.Fa "const struct fuse_opt *descriptions" "fuse_opt_proc_t processingfunc" 51.Fc 52.Ft int 53.Fo fuse_teardown 54.Fa "struct fuse *fuse" "char *mountpoint" 55.Fc 56.Ft struct fuse * 57.Fo fuse_setup 58.Fa "int argc" "char **argv" "const struct fuse_operations *ops" 59.Fa "size_t opssize" "char **mountpoint" "int *multithreaded" "int *fd" 60.Fc 61.Ft int 62.Fo puffs_fuse_node_getattr 63.Fa "const char *path" "struct stat *attrs" 64.Fc 65.Ft int 66.Fo puffs_fuse_node_readlink 67.Fa "const char *path" "char *output" "size_t outlen" 68.Fc 69.Ft int 70.Fo puffs_fuse_node_mknod 71.Fa "const char *path" "mode_t permissions" "dev_t devicenumber" 72.Fc 73.Ft int 74.Fo puffs_fuse_node_mkdir 75.Fa "const char *path" "mode_t permissions" 76.Fc 77.Ft int 78.Fo puffs_fuse_unlink 79.Fa "const char *path" 80.Fc 81.Ft int 82.Fo puffs_fuse_node_rmdir 83.Fa "const char *path" 84.Fc 85.Ft int 86.Fo puffs_fuse_node_symlink 87.Fa "const char *path" "const char *target" 88.Fc 89.Ft int 90.Fo puffs_fuse_node_rename 91.Fa "const char *from" "const char *to" 92.Fc 93.Ft int 94.Fo puffs_fuse_node_link 95.Fa "const char *from" "const char *to" 96.Fc 97.Ft int 98.Fo puffs_fuse_node_chmod 99.Fa "const char *path" "mode_t permissions" 100.Fc 101.Ft int 102.Fo puffs_fuse_node_own 103.Fa "const char *path" "uid_t owner" "gid_t group" 104.Fc 105.Ft int 106.Fo puffs_fuse_node_truncate 107.Fa "const char *path" "off_t newsize" 108.Fc 109.Ft int 110.Fo puffs_fuse_node_utime 111.Fa "const char *path" "struct utimbuf *newtimes" 112.Fc 113.Ft int 114.Fo puffs_fuse_node_open 115.Fa "const char *path" "struct fuse_file_info *fileinfo" 116.Fc 117.Ft int 118.Fo puffs_fuse_node_read 119.Fa "const char *path" "char *buffer" "size_t bufferlen" "off_t startoffset" 120.Fa "struct fuse_file_info *fileinfo" 121.Fc 122.Ft int 123.Fo puffs_fuse_node_write 124.Fa "const char *path" "char *buffer" "size_t bufferlen" "off_t startoffset" 125.Fa "struct fuse_file_info *fileinfo" 126.Fc 127.Ft int 128.Fo puffs_fuse_fs_statfs 129.Fa "const char *path" "struct statvfs *vfsinfo" 130.Fc 131.Ft int 132.Fo puffs_fuse_node_flush 133.Fa "const char *path" "struct fuse_file_info *fileinfo" 134.Fc 135.Ft int 136.Fo puffs_fuse_node_fsync 137.Fa "const char *path" "int flags" "struct fuse_file_info *fileinfo" 138.Fc 139.Ft int 140.Fo puffs_fuse_node_setxattr 141.Fa "const char *path" "const char *attrname" "const char *attrvalue" 142.Fa "size_t attrsize" "int flags" 143.Fc 144.Ft int 145.Fo puffs_fuse_node_getxattr 146.Fa "const char *path" "const char *attrname" "const char *attrvalue" 147.Fa "size_t attrvaluesize" 148.Fc 149.Ft int 150.Fo puffs_fuse_node_listxattr 151.Fa "const char *path" "const char *attrname" 152.Fa "size_t attrvaluesize" 153.Fc 154.Ft int 155.Fo puffs_fuse_node_removexattr 156.Fa "const char *path" "const char *attrname" 157.Fc 158.Ft int 159.Fo puffs_fuse_node_opendir 160.Fa "const char *path" "struct fuse_file_info *fileinfo" 161.Fc 162.Ft int 163.Fo puffs_fuse_node_readdir 164.Fa "const char *path" "void *data" "fuse_fill_dir_t fillinfo" 165.Fa "off_t offset" "struct fuse_file_info *fileinfo" 166.Fc 167.Ft int 168.Fo puffs_fuse_node_releasedir 169.Fa "const char *path" "struct fuse_file_info *fileinfo" 170.Fc 171.Ft int 172.Fo puffs_fuse_node_fsyncdir 173.Fa "const char *path" "int flags" "struct fuse_file_info *fileinfo" 174.Fc 175.Ft void * 176.Fo puffs_fuse_fs_init 177.Fa "struct fuse_conn_info *connectioninfo" 178.Fc 179.Ft void 180.Fo puffs_fuse_node_destroy 181.Fa "void *connection" 182.Fc 183.Ft int 184.Fo puffs_fuse_node_access 185.Fa "const char *path" "int accesstype" 186.Fc 187.Ft int 188.Fo puffs_fuse_node_create 189.Fa "const char *path" "mode_t permissions" "struct fuse_file_info *fileinfo" 190.Fc 191.Ft int 192.Fo puffs_fuse_node_ftruncate 193.Fa "const char *path" "off_t offset" "struct fuse_file_info *fileinfo" 194.Fc 195.Ft int 196.Fo puffs_fuse_node_fgetattr 197.Fa "const char *path" "struct stat *attrs" "struct fuse_file_info *fileinfo" 198.Fc 199.Ft int 200.Fo puffs_fuse_node_lock 201.Fa "const char *path" "struct fuse_file_info *fileinfo" 202.Fa "int locktype" "struct flock *lockinfo" 203.Fc 204.Ft int 205.Fo puffs_fuse_node_utimens 206.Fa "const char *path" "const struct timespec *newtimes" 207.Fc 208.Ft int 209.Fo puffs_fuse_node_bmap 210.Fa "const char *path" "size_t mapsize" "uint64_t offset" 211.Fc 212.Sh DESCRIPTION 213.Nm 214is a reimplementation of the file system in user space subsystem. 215Operations are transported from the kernel virtual file system layer 216to the concrete implementation behind 217.Nm , 218where they are processed and results are sent back to the kernel. 219.Pp 220It uses the framework provided by the 221.Xr puffs 3 222subsystem, and, through that, the kernel interface provided by 223.Xr puffs 4 . 224.Sh SEE ALSO 225.Xr puffs 3 , 226.Xr puffs 4 227.Rs 228.%A Antti Kantee 229.%A Alistair Crooks 230.%D September 2007 231.%J EuroBSDCon 2007 232.%T ReFUSE: Userspace FUSE Reimplementation Using puffs 233.Re 234.Sh HISTORY 235An unsupported experimental version of 236.Nm 237first appeared in 238.Nx 5.0 . 239.Sh AUTHORS 240.An Alistair Crooks Aq Mt agc@NetBSD.org , 241.An Antti Kantee Aq Mt pooka@NetBSD.org 242.Sh BUGS 243Many, legion, but well-loved. 244