libfuse: include/fuse_lowlevel.h Source File

libfuse

fuse_lowlevel.h
Go to the documentation of this file.
1 /*
2 FUSE: Filesystem in Userspace
3 Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
4
5 This program can be distributed under the terms of the GNU LGPLv2.
6 See the file COPYING.LIB.
7 */
8
9 #ifndef FUSE_LOWLEVEL_H_
10 #define FUSE_LOWLEVEL_H_
11
21 #ifndef FUSE_USE_VERSION
22 #error FUSE_USE_VERSION not defined
23 #endif
24
25 #include "fuse_common.h"
26
27 #include <utime.h>
28 #include <fcntl.h>
29 #include <sys/types.h>
30 #include <sys/stat.h>
31 #include <sys/statvfs.h>
32 #include <sys/uio.h>
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* ----------------------------------------------------------- *
39 * Miscellaneous definitions *
40 * ----------------------------------------------------------- */
41
43 #define FUSE_ROOT_ID 1
44
46 typedef uint64_t fuse_ino_t;
47
49 typedef struct fuse_req *fuse_req_t;
50
56 struct fuse_session;
57
59 struct fuse_entry_param {
67 fuse_ino_t ino;
68
79 uint64_t generation;
80
88 struct stat attr;
89
94 double attr_timeout;
95
100 double entry_timeout;
101 };
102
111 struct fuse_ctx {
113 uid_t uid;
114
116 gid_t gid;
117
119 pid_t pid;
120
122 mode_t umask;
123 };
124
125 struct fuse_forget_data {
126 fuse_ino_t ino;
127 uint64_t nlookup;
128 };
129
130 struct fuse_custom_io {
131 ssize_t (*writev)(int fd, struct iovec *iov, int count, void *userdata);
132 ssize_t (*read)(int fd, void *buf, size_t buf_len, void *userdata);
133 ssize_t (*splice_receive)(int fdin, off_t *offin, int fdout,
134 off_t *offout, size_t len,
135 unsigned int flags, void *userdata);
136 ssize_t (*splice_send)(int fdin, off_t *offin, int fdout,
137 off_t *offout, size_t len,
138 unsigned int flags, void *userdata);
139 };
140
146 enum fuse_expire_flags {
147 FUSE_LL_EXPIRE_ONLY = (1 << 0),
148 };
149
150 /* 'to_set' flags in setattr */
151 #define FUSE_SET_ATTR_MODE (1 << 0)
152 #define FUSE_SET_ATTR_UID (1 << 1)
153 #define FUSE_SET_ATTR_GID (1 << 2)
154 #define FUSE_SET_ATTR_SIZE (1 << 3)
155 #define FUSE_SET_ATTR_ATIME (1 << 4)
156 #define FUSE_SET_ATTR_MTIME (1 << 5)
157 #define FUSE_SET_ATTR_ATIME_NOW (1 << 7)
158 #define FUSE_SET_ATTR_MTIME_NOW (1 << 8)
159 #define FUSE_SET_ATTR_FORCE (1 << 9)
160 #define FUSE_SET_ATTR_CTIME (1 << 10)
161 #define FUSE_SET_ATTR_KILL_SUID (1 << 11)
162 #define FUSE_SET_ATTR_KILL_SGID (1 << 12)
163 #define FUSE_SET_ATTR_FILE (1 << 13)
164 #define FUSE_SET_ATTR_KILL_PRIV (1 << 14)
165 #define FUSE_SET_ATTR_OPEN (1 << 15)
166 #define FUSE_SET_ATTR_TIMES_SET (1 << 16)
167 #define FUSE_SET_ATTR_TOUCH (1 << 17)
168
169 /* ----------------------------------------------------------- *
170 * Request methods and replies *
171 * ----------------------------------------------------------- */
172
200 struct fuse_lowlevel_ops {
217 void (*init) (void *userdata, struct fuse_conn_info *conn);
218
230 void (*destroy) (void *userdata);
231
243 void (*lookup) (fuse_req_t req, fuse_ino_t parent, const char *name);
244
281 void (*forget) (fuse_req_t req, fuse_ino_t ino, uint64_t nlookup);
282
302 void (*getattr) (fuse_req_t req, fuse_ino_t ino,
303 struct fuse_file_info *fi);
304
333 void (*setattr) (fuse_req_t req, fuse_ino_t ino, struct stat *attr,
334 int to_set, struct fuse_file_info *fi);
335
346 void (*readlink) (fuse_req_t req, fuse_ino_t ino);
347
364 void (*mknod) (fuse_req_t req, fuse_ino_t parent, const char *name,
365 mode_t mode, dev_t rdev);
366
379 void (*mkdir) (fuse_req_t req, fuse_ino_t parent, const char *name,
380 mode_t mode);
381
397 void (*unlink) (fuse_req_t req, fuse_ino_t parent, const char *name);
398
414 void (*rmdir) (fuse_req_t req, fuse_ino_t parent, const char *name);
415
428 void (*symlink) (fuse_req_t req, const char *link, fuse_ino_t parent,
429 const char *name);
430
460 void (*rename) (fuse_req_t req, fuse_ino_t parent, const char *name,
461 fuse_ino_t newparent, const char *newname,
462 unsigned int flags);
463
476 void (*link) (fuse_req_t req, fuse_ino_t ino, fuse_ino_t newparent,
477 const char *newname);
478
535 void (*open) (fuse_req_t req, fuse_ino_t ino,
536 struct fuse_file_info *fi);
537
563 void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off,
564 struct fuse_file_info *fi);
565
592 void (*write) (fuse_req_t req, fuse_ino_t ino, const char *buf,
593 size_t size, off_t off, struct fuse_file_info *fi);
594
633 void (*flush) (fuse_req_t req, fuse_ino_t ino,
634 struct fuse_file_info *fi);
635
661 void (*release) (fuse_req_t req, fuse_ino_t ino,
662 struct fuse_file_info *fi);
663
683 void (*fsync) (fuse_req_t req, fuse_ino_t ino, int datasync,
684 struct fuse_file_info *fi);
685
708 void (*opendir) (fuse_req_t req, fuse_ino_t ino,
709 struct fuse_file_info *fi);
710
754 void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off,
755 struct fuse_file_info *fi);
756
773 void (*releasedir) (fuse_req_t req, fuse_ino_t ino,
774 struct fuse_file_info *fi);
775
798 void (*fsyncdir) (fuse_req_t req, fuse_ino_t ino, int datasync,
799 struct fuse_file_info *fi);
800
811 void (*statfs) (fuse_req_t req, fuse_ino_t ino);
812
824 void (*setxattr) (fuse_req_t req, fuse_ino_t ino, const char *name,
825 const char *value, size_t size, int flags);
826
855 void (*getxattr) (fuse_req_t req, fuse_ino_t ino, const char *name,
856 size_t size);
857
886 void (*listxattr) (fuse_req_t req, fuse_ino_t ino, size_t size);
887
903 void (*removexattr) (fuse_req_t req, fuse_ino_t ino, const char *name);
904
925 void (*access) (fuse_req_t req, fuse_ino_t ino, int mask);
926
954 void (*create) (fuse_req_t req, fuse_ino_t parent, const char *name,
955 mode_t mode, struct fuse_file_info *fi);
956
969 void (*getlk) (fuse_req_t req, fuse_ino_t ino,
970 struct fuse_file_info *fi, struct flock *lock);
971
994 void (*setlk) (fuse_req_t req, fuse_ino_t ino,
995 struct fuse_file_info *fi,
996 struct flock *lock, int sleep);
997
1018 void (*bmap) (fuse_req_t req, fuse_ino_t ino, size_t blocksize,
1019 uint64_t idx);
1020
1021 #if FUSE_USE_VERSION < 35
1022 void (*ioctl) (fuse_req_t req, fuse_ino_t ino, int cmd,
1023 void *arg, struct fuse_file_info *fi, unsigned flags,
1024 const void *in_buf, size_t in_bufsz, size_t out_bufsz);
1025 #else
1054 void (*ioctl) (fuse_req_t req, fuse_ino_t ino, unsigned int cmd,
1055 void *arg, struct fuse_file_info *fi, unsigned flags,
1056 const void *in_buf, size_t in_bufsz, size_t out_bufsz);
1057 #endif
1058
1088 void (*poll) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi,
1089 struct fuse_pollhandle *ph);
1090
1118 void (*write_buf) (fuse_req_t req, fuse_ino_t ino,
1119 struct fuse_bufvec *bufv, off_t off,
1120 struct fuse_file_info *fi);
1121
1134 void (*retrieve_reply) (fuse_req_t req, void *cookie, fuse_ino_t ino,
1135 off_t offset, struct fuse_bufvec *bufv);
1136
1148 void (*forget_multi) (fuse_req_t req, size_t count,
1149 struct fuse_forget_data *forgets);
1150
1166 void (*flock) (fuse_req_t req, fuse_ino_t ino,
1167 struct fuse_file_info *fi, int op);
1168
1189 void (*fallocate) (fuse_req_t req, fuse_ino_t ino, int mode,
1190 off_t offset, off_t length, struct fuse_file_info *fi);
1191
1217 void (*readdirplus) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off,
1218 struct fuse_file_info *fi);
1219
1250 void (*copy_file_range) (fuse_req_t req, fuse_ino_t ino_in,
1251 off_t off_in, struct fuse_file_info *fi_in,
1252 fuse_ino_t ino_out, off_t off_out,
1253 struct fuse_file_info *fi_out, size_t len,
1254 int flags);
1255
1274 void (*lseek) (fuse_req_t req, fuse_ino_t ino, off_t off, int whence,
1275 struct fuse_file_info *fi);
1276 };
1277
1299 int fuse_reply_err(fuse_req_t req, int err);
1300
1311 void fuse_reply_none(fuse_req_t req);
1312
1326 int fuse_reply_entry(fuse_req_t req, const struct fuse_entry_param *e);
1327
1345 int fuse_reply_create(fuse_req_t req, const struct fuse_entry_param *e,
1346 const struct fuse_file_info *fi);
1347
1359 int fuse_reply_attr(fuse_req_t req, const struct stat *attr,
1360 double attr_timeout);
1361
1372 int fuse_reply_readlink(fuse_req_t req, const char *link);
1373
1387 int fuse_reply_open(fuse_req_t req, const struct fuse_file_info *fi);
1388
1399 int fuse_reply_write(fuse_req_t req, size_t count);
1400
1412 int fuse_reply_buf(fuse_req_t req, const char *buf, size_t size);
1413
1457 int fuse_reply_data(fuse_req_t req, struct fuse_bufvec *bufv,
1458 enum fuse_buf_copy_flags flags);
1459
1471 int fuse_reply_iov(fuse_req_t req, const struct iovec *iov, int count);
1472
1483 int fuse_reply_statfs(fuse_req_t req, const struct statvfs *stbuf);
1484
1495 int fuse_reply_xattr(fuse_req_t req, size_t count);
1496
1507 int fuse_reply_lock(fuse_req_t req, const struct flock *lock);
1508
1519 int fuse_reply_bmap(fuse_req_t req, uint64_t idx);
1520
1521 /* ----------------------------------------------------------- *
1522 * Filling a buffer in readdir *
1523 * ----------------------------------------------------------- */
1524
1552 size_t fuse_add_direntry(fuse_req_t req, char *buf, size_t bufsize,
1553 const char *name, const struct stat *stbuf,
1554 off_t off);
1555
1569 size_t fuse_add_direntry_plus(fuse_req_t req, char *buf, size_t bufsize,
1570 const char *name,
1571 const struct fuse_entry_param *e, off_t off);
1572
1588 int fuse_reply_ioctl_retry(fuse_req_t req,
1589 const struct iovec *in_iov, size_t in_count,
1590 const struct iovec *out_iov, size_t out_count);
1591
1603 int fuse_reply_ioctl(fuse_req_t req, int result, const void *buf, size_t size);
1604
1616 int fuse_reply_ioctl_iov(fuse_req_t req, int result, const struct iovec *iov,
1617 int count);
1618
1625 int fuse_reply_poll(fuse_req_t req, unsigned revents);
1626
1637 int fuse_reply_lseek(fuse_req_t req, off_t off);
1638
1639 /* ----------------------------------------------------------- *
1640 * Notification *
1641 * ----------------------------------------------------------- */
1642
1650 int fuse_lowlevel_notify_poll(struct fuse_pollhandle *ph);
1651
1675 int fuse_lowlevel_notify_inval_inode(struct fuse_session *se, fuse_ino_t ino,
1676 off_t off, off_t len);
1677
1703 int fuse_lowlevel_notify_inval_entry(struct fuse_session *se, fuse_ino_t parent,
1704 const char *name, size_t namelen);
1705
1733 int fuse_lowlevel_notify_expire_entry(struct fuse_session *se, fuse_ino_t parent,
1734 const char *name, size_t namelen,
1735 enum fuse_expire_flags flags);
1736
1765 int fuse_lowlevel_notify_delete(struct fuse_session *se,
1766 fuse_ino_t parent, fuse_ino_t child,
1767 const char *name, size_t namelen);
1768
1794 int fuse_lowlevel_notify_store(struct fuse_session *se, fuse_ino_t ino,
1795 off_t offset, struct fuse_bufvec *bufv,
1796 enum fuse_buf_copy_flags flags);
1826 int fuse_lowlevel_notify_retrieve(struct fuse_session *se, fuse_ino_t ino,
1827 size_t size, off_t offset, void *cookie);
1828
1829
1830 /* ----------------------------------------------------------- *
1831 * Utility functions *
1832 * ----------------------------------------------------------- */
1833
1840 void *fuse_req_userdata(fuse_req_t req);
1841
1851 const struct fuse_ctx *fuse_req_ctx(fuse_req_t req);
1852
1872 int fuse_req_getgroups(fuse_req_t req, int size, gid_t list[]);
1873
1880 typedef void (*fuse_interrupt_func_t)(fuse_req_t req, void *data);
1881
1893 void fuse_req_interrupt_func(fuse_req_t req, fuse_interrupt_func_t func,
1894 void *data);
1895
1902 int fuse_req_interrupted(fuse_req_t req);
1903
1904
1905 /* ----------------------------------------------------------- *
1906 * Inquiry functions *
1907 * ----------------------------------------------------------- */
1908
1912 void fuse_lowlevel_version(void);
1913
1919 void fuse_lowlevel_help(void);
1920
1924 void fuse_cmdline_help(void);
1925
1926 /* ----------------------------------------------------------- *
1927 * Filesystem setup & teardown *
1928 * ----------------------------------------------------------- */
1929
1935 struct fuse_cmdline_opts {
1936 int singlethread;
1937 int foreground;
1938 int debug;
1939 int nodefault_subtype;
1940 char *mountpoint;
1941 int show_version;
1942 int show_help;
1943 int clone_fd;
1944 unsigned int max_idle_threads; /* discouraged, due to thread
1945 * destruct overhead */
1946
1947 /* Added in libfuse-3.12 */
1948 unsigned int max_threads;
1949 };
1950
1969 #if (defined(LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS))
1970 int fuse_parse_cmdline(struct fuse_args *args,
1971 struct fuse_cmdline_opts *opts);
1972 #else
1973 #if FUSE_USE_VERSION < FUSE_MAKE_VERSION(3, 12)
1974 int fuse_parse_cmdline_30(struct fuse_args *args,
1975 struct fuse_cmdline_opts *opts);
1976 #define fuse_parse_cmdline(args, opts) fuse_parse_cmdline_30(args, opts)
1977 #else
1978 int fuse_parse_cmdline_312(struct fuse_args *args,
1979 struct fuse_cmdline_opts *opts);
1980 #define fuse_parse_cmdline(args, opts) fuse_parse_cmdline_312(args, opts)
1981 #endif
1982 #endif
1983
2012 struct fuse_session *fuse_session_new(struct fuse_args *args,
2013 const struct fuse_lowlevel_ops *op,
2014 size_t op_size, void *userdata);
2015
2043 int fuse_session_custom_io(struct fuse_session *se,
2044 const struct fuse_custom_io *io, int fd);
2045
2054 int fuse_session_mount(struct fuse_session *se, const char *mountpoint);
2055
2078 int fuse_session_loop(struct fuse_session *se);
2079
2080 #if FUSE_USE_VERSION < 32
2081 int fuse_session_loop_mt_31(struct fuse_session *se, int clone_fd);
2082 #define fuse_session_loop_mt(se, clone_fd) fuse_session_loop_mt_31(se, clone_fd)
2083 #elif FUSE_USE_VERSION < FUSE_MAKE_VERSION(3, 12)
2084 int fuse_session_loop_mt_32(struct fuse_session *se, struct fuse_loop_config *config);
2085 #define fuse_session_loop_mt(se, config) fuse_session_loop_mt_32(se, config)
2086 #else
2087 #if (defined(LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS))
2099 int fuse_session_loop_mt(struct fuse_session *se, struct fuse_loop_config *config);
2100 #else
2101 int fuse_session_loop_mt_312(struct fuse_session *se, struct fuse_loop_config *config);
2102 #define fuse_session_loop_mt(se, config) fuse_session_loop_mt_312(se, config)
2103 #endif
2104 #endif
2105
2115 void fuse_session_exit(struct fuse_session *se);
2116
2122 void fuse_session_reset(struct fuse_session *se);
2123
2130 int fuse_session_exited(struct fuse_session *se);
2131
2156 void fuse_session_unmount(struct fuse_session *se);
2157
2163 void fuse_session_destroy(struct fuse_session *se);
2164
2165 /* ----------------------------------------------------------- *
2166 * Custom event loop support *
2167 * ----------------------------------------------------------- */
2168
2183 int fuse_session_fd(struct fuse_session *se);
2184
2193 void fuse_session_process_buf(struct fuse_session *se,
2194 const struct fuse_buf *buf);
2195
2207 int fuse_session_receive_buf(struct fuse_session *se, struct fuse_buf *buf);
2208
2209 #ifdef __cplusplus
2210 }
2211 #endif
2212
2213 #endif /* FUSE_LOWLEVEL_H_ */
fuse_common.h
fuse_buf_copy_flags
fuse_buf_copy_flags
Definition: fuse_common.h:696
fuse_session_destroy
void fuse_session_destroy(struct fuse_session *se)
Definition: fuse_lowlevel.c:2763
fuse_expire_flags
fuse_expire_flags
Definition: fuse_lowlevel.h:146
fuse_reply_data
int fuse_reply_data(fuse_req_t req, struct fuse_bufvec *bufv, enum fuse_buf_copy_flags flags)
Definition: fuse_lowlevel.c:869
fuse_reply_lock
int fuse_reply_lock(fuse_req_t req, const struct flock *lock)
Definition: fuse_lowlevel.c:913
fuse_reply_open
int fuse_reply_open(fuse_req_t req, const struct fuse_file_info *fi)
Definition: fuse_lowlevel.c:464
fuse_session_exit
void fuse_session_exit(struct fuse_session *se)
fuse_interrupt_func_t
void(* fuse_interrupt_func_t)(fuse_req_t req, void *data)
Definition: fuse_lowlevel.h:1880
fuse_reply_poll
int fuse_reply_poll(fuse_req_t req, unsigned revents)
Definition: fuse_lowlevel.c:1073
fuse_reply_err
int fuse_reply_err(fuse_req_t req, int err)
Definition: fuse_lowlevel.c:319
fuse_reply_buf
int fuse_reply_buf(fuse_req_t req, const char *buf, size_t size)
Definition: fuse_lowlevel.c:483
fuse_req_t
struct fuse_req * fuse_req_t
Definition: fuse_lowlevel.h:49
fuse_add_direntry_plus
size_t fuse_add_direntry_plus(fuse_req_t req, char *buf, size_t bufsize, const char *name, const struct fuse_entry_param *e, off_t off)
Definition: fuse_lowlevel.c:364
fuse_reply_ioctl_iov
int fuse_reply_ioctl_iov(fuse_req_t req, int result, const struct iovec *iov, int count)
Definition: fuse_lowlevel.c:1049
fuse_lowlevel_notify_delete
int fuse_lowlevel_notify_delete(struct fuse_session *se, fuse_ino_t parent, fuse_ino_t child, const char *name, size_t namelen)
Definition: fuse_lowlevel.c:2328
fuse_session_process_buf
void fuse_session_process_buf(struct fuse_session *se, const struct fuse_buf *buf)
Definition: fuse_lowlevel.c:2590
fuse_session_exited
int fuse_session_exited(struct fuse_session *se)
fuse_session_fd
int fuse_session_fd(struct fuse_session *se)
Definition: fuse_lowlevel.c:3144
fuse_req_interrupted
int fuse_req_interrupted(fuse_req_t req)
Definition: fuse_lowlevel.c:2502
fuse_req_getgroups
int fuse_req_getgroups(fuse_req_t req, int size, gid_t list[])
Definition: fuse_lowlevel.c:3222
fuse_lowlevel_notify_retrieve
int fuse_lowlevel_notify_retrieve(struct fuse_session *se, fuse_ino_t ino, size_t size, off_t offset, void *cookie)
Definition: fuse_lowlevel.c:2434
fuse_reply_readlink
int fuse_reply_readlink(fuse_req_t req, const char *link)
Definition: fuse_lowlevel.c:459
fuse_session_loop
int fuse_session_loop(struct fuse_session *se)
Definition: fuse_loop.c:19
fuse_reply_iov
int fuse_reply_iov(fuse_req_t req, const struct iovec *iov, int count)
Definition: fuse_lowlevel.c:253
fuse_reply_bmap
int fuse_reply_bmap(fuse_req_t req, uint64_t idx)
Definition: fuse_lowlevel.c:930
fuse_reply_entry
int fuse_reply_entry(fuse_req_t req, const struct fuse_entry_param *e)
Definition: fuse_lowlevel.c:412
fuse_session_unmount
void fuse_session_unmount(struct fuse_session *se)
Definition: fuse_lowlevel.c:3149
fuse_cmdline_help
void fuse_cmdline_help(void)
Definition: helper.c:130
fuse_reply_none
void fuse_reply_none(fuse_req_t req)
Definition: fuse_lowlevel.c:324
fuse_reply_ioctl_retry
int fuse_reply_ioctl_retry(fuse_req_t req, const struct iovec *in_iov, size_t in_count, const struct iovec *out_iov, size_t out_count)
Definition: fuse_lowlevel.c:958
fuse_lowlevel_help
void fuse_lowlevel_help(void)
Definition: fuse_lowlevel.c:2753
fuse_lowlevel_notify_inval_inode
int fuse_lowlevel_notify_inval_inode(struct fuse_session *se, fuse_ino_t ino, off_t off, off_t len)
Definition: fuse_lowlevel.c:2272
fuse_session_new
struct fuse_session * fuse_session_new(struct fuse_args *args, const struct fuse_lowlevel_ops *op, size_t op_size, void *userdata)
Definition: fuse_lowlevel.c:2964
fuse_reply_statfs
int fuse_reply_statfs(fuse_req_t req, const struct statvfs *stbuf)
Definition: fuse_lowlevel.c:891
fuse_reply_write
int fuse_reply_write(fuse_req_t req, size_t count)
Definition: fuse_lowlevel.c:473
fuse_session_receive_buf
int fuse_session_receive_buf(struct fuse_session *se, struct fuse_buf *buf)
Definition: fuse_lowlevel.c:2792
fuse_session_mount
int fuse_session_mount(struct fuse_session *se, const char *mountpoint)
Definition: fuse_lowlevel.c:3094
fuse_parse_cmdline_30
int fuse_parse_cmdline_30(struct fuse_args *args, struct fuse_cmdline_opts *opts)
Definition: helper.c:237
fuse_req_userdata
void * fuse_req_userdata(fuse_req_t req)
Definition: fuse_lowlevel.c:2479
fuse_lowlevel_notify_expire_entry
int fuse_lowlevel_notify_expire_entry(struct fuse_session *se, fuse_ino_t parent, const char *name, size_t namelen, enum fuse_expire_flags flags)
Definition: fuse_lowlevel.c:2294
fuse_lowlevel_notify_poll
int fuse_lowlevel_notify_poll(struct fuse_pollhandle *ph)
Definition: fuse_lowlevel.c:2255
fuse_lowlevel_notify_inval_entry
int fuse_lowlevel_notify_inval_entry(struct fuse_session *se, fuse_ino_t parent, const char *name, size_t namelen)
Definition: fuse_lowlevel.c:2321
fuse_req_interrupt_func
void fuse_req_interrupt_func(fuse_req_t req, fuse_interrupt_func_t func, void *data)
Definition: fuse_lowlevel.c:2489
fuse_session_reset
void fuse_session_reset(struct fuse_session *se)
fuse_session_custom_io
int fuse_session_custom_io(struct fuse_session *se, const struct fuse_custom_io *io, int fd)
Definition: fuse_lowlevel.c:3060
fuse_reply_create
int fuse_reply_create(fuse_req_t req, const struct fuse_entry_param *e, const struct fuse_file_info *fi)
Definition: fuse_lowlevel.c:428
fuse_reply_lseek
int fuse_reply_lseek(fuse_req_t req, off_t off)
Definition: fuse_lowlevel.c:1083
fuse_lowlevel_version
void fuse_lowlevel_version(void)
Definition: fuse_lowlevel.c:2746
fuse_ino_t
uint64_t fuse_ino_t
Definition: fuse_lowlevel.h:46
fuse_add_direntry
size_t fuse_add_direntry(fuse_req_t req, char *buf, size_t bufsize, const char *name, const struct stat *stbuf, off_t off)
Definition: fuse_lowlevel.c:274
fuse_req_ctx
const struct fuse_ctx * fuse_req_ctx(fuse_req_t req)
Definition: fuse_lowlevel.c:2484
fuse_reply_attr
int fuse_reply_attr(fuse_req_t req, const struct stat *attr, double attr_timeout)
Definition: fuse_lowlevel.c:444
fuse_reply_ioctl
int fuse_reply_ioctl(fuse_req_t req, int result, const void *buf, size_t size)
Definition: fuse_lowlevel.c:1028
fuse_lowlevel_notify_store
int fuse_lowlevel_notify_store(struct fuse_session *se, fuse_ino_t ino, off_t offset, struct fuse_bufvec *bufv, enum fuse_buf_copy_flags flags)
Definition: fuse_lowlevel.c:2354
fuse_reply_xattr
int fuse_reply_xattr(fuse_req_t req, size_t count)
Definition: fuse_lowlevel.c:903
fuse_args
Definition: fuse_opt.h:109
fuse_buf
Definition: fuse_common.h:741
fuse_bufvec
Definition: fuse_common.h:782
fuse_bufvec::off
size_t off
Definition: fuse_common.h:796
fuse_bufvec::count
size_t count
Definition: fuse_common.h:786
fuse_cmdline_opts
Definition: fuse_lowlevel.h:1935
fuse_conn_info
Definition: fuse_common.h:460
fuse_ctx
Definition: fuse_lowlevel.h:111
fuse_ctx::pid
pid_t pid
Definition: fuse_lowlevel.h:119
fuse_ctx::gid
gid_t gid
Definition: fuse_lowlevel.h:116
fuse_ctx::umask
mode_t umask
Definition: fuse_lowlevel.h:122
fuse_ctx::uid
uid_t uid
Definition: fuse_lowlevel.h:113
fuse_entry_param
Definition: fuse_lowlevel.h:59
fuse_entry_param::entry_timeout
double entry_timeout
Definition: fuse_lowlevel.h:100
fuse_entry_param::ino
fuse_ino_t ino
Definition: fuse_lowlevel.h:67
fuse_entry_param::generation
uint64_t generation
Definition: fuse_lowlevel.h:79
fuse_entry_param::attr_timeout
double attr_timeout
Definition: fuse_lowlevel.h:94
fuse_entry_param::attr
struct stat attr
Definition: fuse_lowlevel.h:88
fuse_file_info
Definition: fuse_common.h:50
fuse_file_info::flags
int flags
Definition: fuse_common.h:52
fuse_loop_config
Definition: fuse_common.h:126
fuse_lowlevel_ops
Definition: fuse_lowlevel.h:200
fuse_lowlevel_ops::fsync
void(* fsync)(fuse_req_t req, fuse_ino_t ino, int datasync, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:683
fuse_lowlevel_ops::bmap
void(* bmap)(fuse_req_t req, fuse_ino_t ino, size_t blocksize, uint64_t idx)
Definition: fuse_lowlevel.h:1018
fuse_lowlevel_ops::unlink
void(* unlink)(fuse_req_t req, fuse_ino_t parent, const char *name)
Definition: fuse_lowlevel.h:397
fuse_lowlevel_ops::getxattr
void(* getxattr)(fuse_req_t req, fuse_ino_t ino, const char *name, size_t size)
Definition: fuse_lowlevel.h:855
fuse_lowlevel_ops::rename
void(* rename)(fuse_req_t req, fuse_ino_t parent, const char *name, fuse_ino_t newparent, const char *newname, unsigned int flags)
Definition: fuse_lowlevel.h:460
fuse_lowlevel_ops::releasedir
void(* releasedir)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:773
fuse_lowlevel_ops::setxattr
void(* setxattr)(fuse_req_t req, fuse_ino_t ino, const char *name, const char *value, size_t size, int flags)
Definition: fuse_lowlevel.h:824
fuse_lowlevel_ops::write_buf
void(* write_buf)(fuse_req_t req, fuse_ino_t ino, struct fuse_bufvec *bufv, off_t off, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:1118
fuse_lowlevel_ops::symlink
void(* symlink)(fuse_req_t req, const char *link, fuse_ino_t parent, const char *name)
Definition: fuse_lowlevel.h:428
fuse_lowlevel_ops::statfs
void(* statfs)(fuse_req_t req, fuse_ino_t ino)
Definition: fuse_lowlevel.h:811
fuse_lowlevel_ops::release
void(* release)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:661
fuse_lowlevel_ops::readdir
void(* readdir)(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:754
fuse_lowlevel_ops::fallocate
void(* fallocate)(fuse_req_t req, fuse_ino_t ino, int mode, off_t offset, off_t length, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:1189
fuse_lowlevel_ops::create
void(* create)(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:954
fuse_lowlevel_ops::link
void(* link)(fuse_req_t req, fuse_ino_t ino, fuse_ino_t newparent, const char *newname)
Definition: fuse_lowlevel.h:476
fuse_lowlevel_ops::write
void(* write)(fuse_req_t req, fuse_ino_t ino, const char *buf, size_t size, off_t off, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:592
fuse_lowlevel_ops::lookup
void(* lookup)(fuse_req_t req, fuse_ino_t parent, const char *name)
Definition: fuse_lowlevel.h:243
fuse_lowlevel_ops::readdirplus
void(* readdirplus)(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:1217
fuse_lowlevel_ops::flock
void(* flock)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, int op)
Definition: fuse_lowlevel.h:1166
fuse_lowlevel_ops::getattr
void(* getattr)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:302
fuse_lowlevel_ops::copy_file_range
void(* copy_file_range)(fuse_req_t req, fuse_ino_t ino_in, off_t off_in, struct fuse_file_info *fi_in, fuse_ino_t ino_out, off_t off_out, struct fuse_file_info *fi_out, size_t len, int flags)
Definition: fuse_lowlevel.h:1250
fuse_lowlevel_ops::setattr
void(* setattr)(fuse_req_t req, fuse_ino_t ino, struct stat *attr, int to_set, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:333
fuse_lowlevel_ops::open
void(* open)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:535
fuse_lowlevel_ops::removexattr
void(* removexattr)(fuse_req_t req, fuse_ino_t ino, const char *name)
Definition: fuse_lowlevel.h:903
fuse_lowlevel_ops::forget
void(* forget)(fuse_req_t req, fuse_ino_t ino, uint64_t nlookup)
Definition: fuse_lowlevel.h:281
fuse_lowlevel_ops::poll
void(* poll)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, struct fuse_pollhandle *ph)
Definition: fuse_lowlevel.h:1088
fuse_lowlevel_ops::ioctl
void(* ioctl)(fuse_req_t req, fuse_ino_t ino, unsigned int cmd, void *arg, struct fuse_file_info *fi, unsigned flags, const void *in_buf, size_t in_bufsz, size_t out_bufsz)
Definition: fuse_lowlevel.h:1054
fuse_lowlevel_ops::rmdir
void(* rmdir)(fuse_req_t req, fuse_ino_t parent, const char *name)
Definition: fuse_lowlevel.h:414
fuse_lowlevel_ops::init
void(* init)(void *userdata, struct fuse_conn_info *conn)
Definition: fuse_lowlevel.h:217
fuse_lowlevel_ops::setlk
void(* setlk)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, struct flock *lock, int sleep)
Definition: fuse_lowlevel.h:994
fuse_lowlevel_ops::retrieve_reply
void(* retrieve_reply)(fuse_req_t req, void *cookie, fuse_ino_t ino, off_t offset, struct fuse_bufvec *bufv)
Definition: fuse_lowlevel.h:1134
fuse_lowlevel_ops::fsyncdir
void(* fsyncdir)(fuse_req_t req, fuse_ino_t ino, int datasync, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:798
fuse_lowlevel_ops::destroy
void(* destroy)(void *userdata)
Definition: fuse_lowlevel.h:230
fuse_lowlevel_ops::mkdir
void(* mkdir)(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode)
Definition: fuse_lowlevel.h:379
fuse_lowlevel_ops::access
void(* access)(fuse_req_t req, fuse_ino_t ino, int mask)
Definition: fuse_lowlevel.h:925
fuse_lowlevel_ops::mknod
void(* mknod)(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode, dev_t rdev)
Definition: fuse_lowlevel.h:364
fuse_lowlevel_ops::lseek
void(* lseek)(fuse_req_t req, fuse_ino_t ino, off_t off, int whence, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:1274
fuse_lowlevel_ops::getlk
void(* getlk)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, struct flock *lock)
Definition: fuse_lowlevel.h:969
fuse_lowlevel_ops::readlink
void(* readlink)(fuse_req_t req, fuse_ino_t ino)
Definition: fuse_lowlevel.h:346
fuse_lowlevel_ops::read
void(* read)(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:563
fuse_lowlevel_ops::flush
void(* flush)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:633
fuse_lowlevel_ops::listxattr
void(* listxattr)(fuse_req_t req, fuse_ino_t ino, size_t size)
Definition: fuse_lowlevel.h:886
fuse_lowlevel_ops::opendir
void(* opendir)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
Definition: fuse_lowlevel.h:708
fuse_lowlevel_ops::forget_multi
void(* forget_multi)(fuse_req_t req, size_t count, struct fuse_forget_data *forgets)
Definition: fuse_lowlevel.h:1148