aboutsummaryrefslogtreecommitdiffstats
path: root/example/passthrough_hp.cc
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2023-12-04 15:58:45 +0100
committerNikolaus Rath <Nikolaus@rath.org>2024-01-10 20:59:03 +0000
commit22741f5582ea003c3518aff76e8df6561403f88b (patch)
tree970e1748d6f893c8fd465a6692c68acfade28de9 /example/passthrough_hp.cc
parent0392acbb2340066171d372b483f059941095c7f9 (diff)
downloadlibfuse-22741f5582ea003c3518aff76e8df6561403f88b.tar.gz
Add FUSE_CAP_DIRECT_IO_ALLOW_MMAP and use in passthrough_hp
This is not called FUSE_CAP_DIRECT_IO_RELAX, as the kernel flag FUSE_DIRECT_IO_RELAX is supposed to be renamed to FUSE_DIRECT_IO_ALLOW_MMAP. The corresponding kernel patches just did not land yet.
Diffstat (limited to 'example/passthrough_hp.cc')
-rw-r--r--example/passthrough_hp.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/example/passthrough_hp.cc b/example/passthrough_hp.cc
index 96201d6..66fe6f8 100644
--- a/example/passthrough_hp.cc
+++ b/example/passthrough_hp.cc
@@ -212,6 +212,10 @@ static void sfs_init(void *userdata, fuse_conn_info *conn) {
if (conn->capable & FUSE_CAP_SPLICE_READ)
conn->want |= FUSE_CAP_SPLICE_READ;
}
+
+ /* This is a local file system - no network coherency needed */
+ if (conn->capable & FUSE_CAP_DIRECT_IO_ALLOW_MMAP)
+ conn->want |= FUSE_CAP_DIRECT_IO_ALLOW_MMAP;
}