aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2016-10-10 16:14:17 -0700
committerNikolaus Rath <Nikolaus@rath.org>2016-10-13 10:35:12 -0700
commit3ff500f9f25a37616ee69d2f876ac087c728895b (patch)
tree4fa694b1b325c7517aaacb5f77bef592f01b8ab3
parentdc436101370e0ab2ea4d3a2a3454711ad7051ae8 (diff)
downloadlibfuse-3ff500f9f25a37616ee69d2f876ac087c728895b.tar.gz
Activate splice_read by default if write_buf is implemented.
-rw-r--r--ChangeLog.rst4
-rw-r--r--lib/fuse_lowlevel.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst
index 4f355ce..5ddefdb 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,6 +1,10 @@
Unreleased Changes
==================
+* For low-level file systems that implement the `write_buf` handler,
+ the `splice_read` option is now enabled by default. As usual, this
+ can be changed in the file system's `init` handler.
+
* `fuse_session_new` now treats low-level options more consistently:
First, options are used to modify FUSE defaults. Second, the file
system may inspect and/or adjust the settings in its `init`
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 3b30b21..d10191b 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -1928,6 +1928,7 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
if ((cond) && (f->conn.capable & (cap))) \
f->conn.want |= (cap)
LL_SET_DEFAULT(1, FUSE_CAP_ASYNC_READ);
+ LL_SET_DEFAULT(f->op.write_buf, FUSE_CAP_SPLICE_READ);
LL_SET_DEFAULT(f->op.getlk && f->op.setlk,
FUSE_CAP_POSIX_LOCKS);
LL_SET_DEFAULT(f->op.flock, FUSE_CAP_FLOCK_LOCKS);