aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse_common.h
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 /include/fuse_common.h
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 'include/fuse_common.h')
-rw-r--r--include/fuse_common.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/fuse_common.h b/include/fuse_common.h
index 3ff14ec..a804134 100644
--- a/include/fuse_common.h
+++ b/include/fuse_common.h
@@ -441,6 +441,15 @@ struct fuse_loop_config_v1 {
#define FUSE_CAP_SETXATTR_EXT (1 << 27)
/**
+ * Files opened with FUSE_DIRECT_IO do not support MAP_SHARED mmap. This restriction
+ * is relaxed through FUSE_CAP_DIRECT_IO_RELAX (kernel flag: FUSE_DIRECT_IO_RELAX).
+ * MAP_SHARED is disabled by default for FUSE_DIRECT_IO, as this flag can be used to
+ * ensure coherency between mount points (or network clients) and with kernel page
+ * cache as enforced by mmap that cannot be guaranteed anymore.
+ */
+#define FUSE_CAP_DIRECT_IO_ALLOW_MMAP (1 << 27)
+
+/**
* Ioctl flags
*
* FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine