aboutsummaryrefslogtreecommitdiff
path: root/lib/fuse_lowlevel.c
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2016-11-16 13:04:47 -0800
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2016-11-16 13:14:30 -0800
commit08ce854a739d25a31995886a0f0697c564f28e94 (patch)
treed0111f797d22946a2dbc56a3c5192d68958ee642 /lib/fuse_lowlevel.c
parent007c9a29ed02b4030481f50b138446790dccdae6 (diff)
Enable more capabilities by default, and document defaults.
Fixes #112.
Diffstat (limited to 'lib/fuse_lowlevel.c')
-rw-r--r--lib/fuse_lowlevel.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 77fc014..c53c9f7 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -1890,11 +1890,21 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
if (se->conn.proto_minor >= 18)
se->conn.capable |= FUSE_CAP_IOCTL_DIR;
- /* Default settings (where non-zero) */
+ /* Default settings for modern filesystems.
+ *
+ * Most of these capabilities were disabled by default in
+ * libfuse2 for backwards compatibility reasons. In libfuse3,
+ * we can finally enable them by default (as long as they're
+ * supported by the kernel).
+ */
#define LL_SET_DEFAULT(cond, cap) \
if ((cond) && (se->conn.capable & (cap))) \
se->conn.want |= (cap)
LL_SET_DEFAULT(1, FUSE_CAP_ASYNC_READ);
+ LL_SET_DEFAULT(1, FUSE_CAP_AUTO_INVAL_DATA);
+ LL_SET_DEFAULT(1, FUSE_CAP_ASYNC_DIO);
+ LL_SET_DEFAULT(1, FUSE_CAP_IOCTL_DIR);
+ LL_SET_DEFAULT(1, FUSE_CAP_ATOMIC_O_TRUNC);
LL_SET_DEFAULT(se->op.write_buf, FUSE_CAP_SPLICE_READ);
LL_SET_DEFAULT(se->op.getlk && se->op.setlk,
FUSE_CAP_POSIX_LOCKS);