Page MenuHomeFreeBSD

FUSE: The FUSE design expects writethrough caching
AbandonedPublic

Authored by cem on Feb 12 2019, 9:41 AM.

Details

Reviewers
None
Summary

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.

Refs:

PR: 230258 (related)

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 22461
Build 21616: arc lint + arc unit