* FUSE_CAP_SPLICE_MOVE: ability to move data to the fuse device with splice()
* FUSE_CAP_SPLICE_READ: ability to use splice() to read from the fuse device
* FUSE_CAP_IOCTL_DIR: ioctl support on directories
+ * FUSE_CAP_AUTO_INVAL_DATA: automatically invalidate cached pages
+ * FUSE_CAP_DO_READDIRPLUS: do READDIRPLUS (READDIR+LOOKUP in one)
+ * FUSE_CAP_READDIRPLUS_AUTO: adaptive readdirplus
+ * FUSE_CAP_ASYNC_DIO: asynchronous direct I/O submission
+ * FUSE_CAP_WRITEBACK_CACHE: use writeback cache for buffered writes
*/
#define FUSE_CAP_ASYNC_READ (1 << 0)
#define FUSE_CAP_POSIX_LOCKS (1 << 1)
#define FUSE_CAP_AUTO_INVAL_DATA (1 << 12)
#define FUSE_CAP_READDIRPLUS (1 << 13)
#define FUSE_CAP_READDIRPLUS_AUTO (1 << 14)
+#define FUSE_CAP_ASYNC_DIO (1 << 15)
+#define FUSE_CAP_WRITEBACK_CACHE (1 << 16)
/**
* Ioctl flags
* 7.21
* - add FUSE_READDIRPLUS
* - send the requested events in POLL request
+ *
+ * 7.22
+ * - add FUSE_ASYNC_DIO
+ *
+ * 7.23
+ * - add FUSE_WRITEBACK_CACHE
*/
#ifndef _LINUX_FUSE_H
#define FUSE_KERNEL_VERSION 7
/** Minor version number of this interface */
-#define FUSE_KERNEL_MINOR_VERSION 21
+#define FUSE_KERNEL_MINOR_VERSION 22
/** The node ID of the root inode */
#define FUSE_ROOT_ID 1
* FUSE_AUTO_INVAL_DATA: automatically invalidate cached pages
* FUSE_DO_READDIRPLUS: do READDIRPLUS (READDIR+LOOKUP in one)
* FUSE_READDIRPLUS_AUTO: adaptive readdirplus
+ * FUSE_ASYNC_DIO: asynchronous direct I/O submission
+ * FUSE_WRITEBACK_CACHE: use writeback cache for buffered writes
*/
#define FUSE_ASYNC_READ (1 << 0)
#define FUSE_POSIX_LOCKS (1 << 1)
#define FUSE_AUTO_INVAL_DATA (1 << 12)
#define FUSE_DO_READDIRPLUS (1 << 13)
#define FUSE_READDIRPLUS_AUTO (1 << 14)
+#define FUSE_ASYNC_DIO (1 << 15)
+#define FUSE_WRITEBACK_CACHE (1 << 16)
/**
* CUSE INIT request/reply flags
f->conn.capable |= FUSE_CAP_READDIRPLUS;
if (arg->flags & FUSE_READDIRPLUS_AUTO)
f->conn.capable |= FUSE_CAP_READDIRPLUS_AUTO;
+ if (arg->flags & FUSE_ASYNC_DIO)
+ f->conn.capable |= FUSE_CAP_ASYNC_DIO;
+ if (arg->flags & FUSE_WRITEBACK_CACHE)
+ f->conn.capable |= FUSE_CAP_WRITEBACK_CACHE;
} else {
f->conn.async_read = 0;
f->conn.max_readahead = 0;
if (!f->no_readdirplus_auto)
f->conn.want |= FUSE_CAP_READDIRPLUS_AUTO;
}
+ if (f->async_dio)
+ f->conn.want |= FUSE_CAP_ASYNC_DIO;
+ if (f->writeback_cache)
+ f->conn.want |= FUSE_CAP_WRITEBACK_CACHE;
if (bufsize < FUSE_MIN_READ_BUFFER) {
fprintf(stderr, "fuse: warning: buffer size too small: %zu\n",
f->conn.want &= ~FUSE_CAP_READDIRPLUS;
if (f->no_readdirplus_auto)
f->conn.want &= ~FUSE_CAP_READDIRPLUS_AUTO;
+ if (f->no_async_dio)
+ f->conn.want &= ~FUSE_CAP_ASYNC_DIO;
+ if (f->no_writeback_cache)
+ f->conn.want &= ~FUSE_CAP_WRITEBACK_CACHE;
+
if (f->conn.async_read || (f->conn.want & FUSE_CAP_ASYNC_READ))
outarg.flags |= FUSE_ASYNC_READ;
if (f->conn.want & FUSE_CAP_POSIX_LOCKS)
outarg.flags |= FUSE_DO_READDIRPLUS;
if (f->conn.want & FUSE_CAP_READDIRPLUS_AUTO)
outarg.flags |= FUSE_READDIRPLUS_AUTO;
+ if (f->conn.want & FUSE_CAP_ASYNC_DIO)
+ outarg.flags |= FUSE_ASYNC_DIO;
+ if (f->conn.want & FUSE_CAP_WRITEBACK_CACHE)
+ outarg.flags |= FUSE_WRITEBACK_CACHE;
outarg.max_readahead = f->conn.max_readahead;
outarg.max_write = f->conn.max_write;
if (f->conn.proto_minor >= 13) {
{ "readdirplus=yes", offsetof(struct fuse_ll, no_readdirplus_auto), 1},
{ "readdirplus=auto", offsetof(struct fuse_ll, no_readdirplus), 0},
{ "readdirplus=auto", offsetof(struct fuse_ll, no_readdirplus_auto), 0},
+ { "async_dio", offsetof(struct fuse_ll, async_dio), 1},
+ { "no_async_dio", offsetof(struct fuse_ll, no_async_dio), 1},
+ { "writeback_cache", offsetof(struct fuse_ll, writeback_cache), 1},
+ { "no_writeback_cache", offsetof(struct fuse_ll, no_writeback_cache), 1},
FUSE_OPT_KEY("max_read=", FUSE_OPT_KEY_DISCARD),
FUSE_OPT_KEY("-h", KEY_HELP),
FUSE_OPT_KEY("--help", KEY_HELP),
" -o big_writes enable larger than 4kB writes\n"
" -o no_remote_lock disable remote file locking\n"
" -o no_remote_flock disable remote file locking (BSD)\n"
-" -o no_remote_posix_lock disable remove file locking (POSIX)\n"
-" -o [no_]splice_write use splice to write to the fuse device\n"
-" -o [no_]splice_move move data while splicing to the fuse device\n"
-" -o [no_]splice_read use splice to read from the fuse device\n"
+" -o no_remote_posix_lock disable remove file locking (POSIX)\n"
+" -o [no_]splice_write use splice to write to the fuse device\n"
+" -o [no_]splice_move move data while splicing to the fuse device\n"
+" -o [no_]splice_read use splice to read from the fuse device\n"
" -o [no_]auto_inval_data use automatic kernel cache invalidation logic\n"
-" -o readdirplus=S control readdirplus use (yes|no|auto)\n"
+" -o readdirplus=S control readdirplus use (yes|no|auto)\n"
+" -o [no_]async_dio asynchronous direct I/O\n"
+" -o [no_]writeback_cache asynchronous, buffered writes\n"
);
}