From 22741f5582ea003c3518aff76e8df6561403f88b Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Mon, 4 Dec 2023 15:58:45 +0100 Subject: 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. --- example/passthrough_hp.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'example/passthrough_hp.cc') 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; } -- cgit v1.2.3