freebsd-dev/sys/fs/fuse
Conrad Meyer c4af8b173a FUSE: The FUSE design expects writethrough caching
At least prior to 7.23 (which adds FUSE_WRITEBACK_CACHE), the FUSE protocol
specifies only clean data to be cached.

Prior to this change, we implement and default to writeback caching.  This
is ok enough for local only filesystems without hardlinks, but violates the
general design contract with FUSE and breaks distributed filesystems or
concurrent access to hardlinks of the same inode.

In this change, add cache mode as an extension of cache enable/disable.  The
new modes are UC (was: cache disabled), WT (default), and WB (was: cache
enabled).

For now, WT caching is implemented as write-around, which meets the goal of
only caching clean data.  WT can be better than WA for workloads that
frequently read data that was recently written, but WA is trivial to
implement.  Note that this has no effect on O_WRONLY-opened files, which
were already coerced to write-around.

Refs:
  * https://sourceforge.net/p/fuse/mailman/message/8902254/
  * https://github.com/vgough/encfs/issues/315

PR:		230258 (inspired by)
2019-02-15 22:52:49 +00:00
..
fuse_debug.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
fuse_device.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
fuse_file.c FUSE: Remove some set-but-not-used variables 2018-08-08 04:46:03 +00:00
fuse_file.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
fuse_internal.c FUSE: Respect userspace FS "do-not-cache" of path components 2019-02-15 22:50:31 +00:00
fuse_internal.h FUSE: Respect userspace FS "do-not-cache" of file attributes 2019-02-15 22:49:15 +00:00
fuse_io.c FUSE: The FUSE design expects writethrough caching 2019-02-15 22:52:49 +00:00
fuse_io.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
fuse_ipc.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
fuse_ipc.h FUSE: The FUSE design expects writethrough caching 2019-02-15 22:52:49 +00:00
fuse_kernel.h FUSE extattrs: fix issue when neither uio nor size were not passed to VOP_*. 2018-08-21 18:39:47 +00:00
fuse_main.c Allocate pager bufs from UMA instead of 80-ish mutex protected linked list. 2019-01-15 01:02:16 +00:00
fuse_node.c FUSE: The FUSE design expects writethrough caching 2019-02-15 22:52:49 +00:00
fuse_node.h FUSE: Respect userspace FS "do-not-cache" of path components 2019-02-15 22:50:31 +00:00
fuse_param.h Update link count handling in fuse for post-ino64. 2017-12-19 22:40:54 +00:00
fuse_vfsops.c FUSE: Respect userspace FS "do-not-cache" of path components 2019-02-15 22:50:31 +00:00
fuse_vnops.c FUSE: Only "dirty" cached file size when data is dirty 2019-02-15 22:51:09 +00:00
fuse.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00