REFUSE(3)

REFUSE(3) | Library Functions Manual | REFUSE(3)

# NAME

`refuse` —
Re-implementation of a file system in userspace system

# LIBRARY

File System in Userspace Convenience Library (librefuse, -lrefuse)

# SYNOPSIS

`#include <fuse.h>`

int
`fuse_main`(int argc, char **argv, const struct fuse_operations *);

struct fuse_args
`FUSE_ARGS_INIT`(int argc, char **argv);

struct fuse_opt
`FUSE_OPT_KEY`(const char* templ, int32_t key);

struct fuse_opt `FUSE_OPT_END`;
int32_t `FUSE_OPT_KEY_OPT`;
int32_t `FUSE_OPT_KEY_NONOPT`;
int32_t `FUSE_OPT_KEY_KEEP`;
int32_t `FUSE_OPT_KEY_DISCARD`;

int
`fuse_opt_add_arg`(struct fuse_args *args, const char *arg);

int
`fuse_opt_add_opt`(char **opts, const char *opt);

int
`fuse_opt_add_opt_escaped`(char **opts, const char *opt);

void
`fuse_opt_free_args`(struct fuse_args *args);

int
`fuse_opt_insert_arg`(struct fuse_args *args, int pos, const char *arg);

int
`fuse_opt_match`(const struct fuse_opt *opts, const char *opt);

int
`fuse_opt_parse`(struct fuse_args *args, void *userdata, const struct fuse_opt *descriptions, fuse_opt_proc_t processingfunc);

int
`fuse_new`(struct fuse_args *args, const struct fuse_operations *ops, size_t opssize, void *userdata);

int
`fuse_mount`(struct fuse *fuse, const char *mountpoint);

int
`fuse_unmount`(struct fuse* fuse);

int
`fuse_daemonize`(struct fuse *fuse);

int
`fuse_version`(struct fuse *fuse);

int
`puffs_fuse_node_getattr`(const char *path, struct stat *attrs);

int
`puffs_fuse_node_readlink`(const char *path, char *output, size_t outlen);

int
`puffs_fuse_node_mknod`(const char *path, mode_t permissions, dev_t devicenumber);

int
`puffs_fuse_node_mkdir`(const char *path, mode_t permissions);

int
`puffs_fuse_unlink`(const char *path);

int
`puffs_fuse_node_rmdir`(const char *path);

int
`puffs_fuse_node_symlink`(const char *path, const char *target);

int
`puffs_fuse_node_rename`(const char *from, const char *to);

int
`puffs_fuse_node_link`(const char *from, const char *to);

int
`puffs_fuse_node_chmod`(const char *path, mode_t permissions);

int
`puffs_fuse_node_own`(const char *path, uid_t owner, gid_t group);

int
`puffs_fuse_node_truncate`(const char *path, off_t newsize);

int
`puffs_fuse_node_utime`(const char *path, struct utimbuf *newtimes);

int
`puffs_fuse_node_open`(const char *path, struct fuse_file_info *fileinfo);

int
`puffs_fuse_node_read`(const char *path, char *buffer, size_t bufferlen, off_t startoffset, struct fuse_file_info *fileinfo);

int
`puffs_fuse_node_write`(const char *path, char *buffer, size_t bufferlen, off_t startoffset, struct fuse_file_info *fileinfo);

int
`puffs_fuse_fs_statfs`(const char *path, struct statvfs *vfsinfo);

int
`puffs_fuse_node_flush`(const char *path, struct fuse_file_info *fileinfo);

int
`puffs_fuse_node_fsync`(const char *path, int flags, struct fuse_file_info *fileinfo);

int
`puffs_fuse_node_setxattr`(const char *path, const char *attrname, const char *attrvalue, size_t attrsize, int flags);

int
`puffs_fuse_node_getxattr`(const char *path, const char *attrname, const char *attrvalue, size_t attrvaluesize);

int
`puffs_fuse_node_listxattr`(const char *path, const char *attrname, size_t attrvaluesize);

int
`puffs_fuse_node_removexattr`(const char *path, const char *attrname);

int
`puffs_fuse_node_opendir`(const char *path, struct fuse_file_info *fileinfo);

int
`puffs_fuse_node_readdir`(const char *path, void *data, fuse_fill_dir_t fillinfo, off_t offset, struct fuse_file_info *fileinfo);

int
`puffs_fuse_node_releasedir`(const char *path, struct fuse_file_info *fileinfo);

int
`puffs_fuse_node_fsyncdir`(const char *path, int flags, struct fuse_file_info *fileinfo);

void *
`puffs_fuse_fs_init`(struct fuse_conn_info *connectioninfo);

void
`puffs_fuse_node_destroy`(void *connection);

int
`puffs_fuse_node_access`(const char *path, int accesstype);

int
`puffs_fuse_node_create`(const char *path, mode_t permissions, struct fuse_file_info *fileinfo);

int
`puffs_fuse_node_ftruncate`(const char *path, off_t offset, struct fuse_file_info *fileinfo);

int
`puffs_fuse_node_fgetattr`(const char *path, struct stat *attrs, struct fuse_file_info *fileinfo);

int
`puffs_fuse_node_lock`(const char *path, struct fuse_file_info *fileinfo, int locktype, struct flock *lockinfo);

int
`puffs_fuse_node_utimens`(const char *path, const struct timespec *newtimes);

int
`puffs_fuse_node_bmap`(const char *path, size_t mapsize, uint64_t offset);

# DESCRIPTION

`refuse` is a reimplementation of the file system in user space subsystem. Operations are transported from the kernel virtual file system layer to the concrete implementation behind `refuse`, where they are processed and results are sent back to the kernel.

It uses the framework provided by the puffs(3) subsystem, and, through that, the kernel interface provided by puffs(4).

# SEE ALSO

puffs(3), puffs(4)

Antti Kantee and Alistair Crooks, ReFUSE: Userspace FUSE Reimplementation Using puffs, EuroBSDCon 2007, September 2007.

# HISTORY

An unsupported experimental version of `refuse` first appeared in NetBSD 5.0.

# AUTHORS

Alistair Crooks <agc@NetBSD.org>,
Antti Kantee <pooka@NetBSD.org>

# BUGS

Many, legion, but well-loved.

April 11, 2019 | NetBSD 9.5