Page MenuHomeFreeBSD

FUSE: Respect userspace FS "do-not-cache" of path components
AbandonedPublic

Authored by cem on Feb 5 2019, 8:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 19 2024, 10:08 PM
Unknown Object (File)
Feb 10 2024, 9:36 PM
Unknown Object (File)
Dec 20 2023, 3:32 AM
Unknown Object (File)
Nov 25 2023, 5:31 AM
Unknown Object (File)
Nov 23 2023, 10:31 AM
Unknown Object (File)
Nov 23 2023, 10:14 AM
Unknown Object (File)
Nov 23 2023, 10:14 AM
Unknown Object (File)
Jul 15 2023, 8:21 PM

Details

Reviewers
None
Summary

The FUSE protocol demands that kernel implementations cache user filesystem
path components (lookup/cnp data) for a maximum period of time in the range
of [0, ULONG_MAX] seconds. In practice, typical requests are for 0, 1, or
10 seconds; or "a long time" to represent indefinite caching.

Historically, FreeBSD FUSE has ignored this client directive entirely. This
works fine for local-only filesystems, but causes consistency issues with
multi-writer network filesystems.

For now, respect 0 second cache TTLs and do not cache such metadata.
Non-zero metadata caching TTLs in the range [0.000000001, ULONG_MAX] seconds
are still cached indefinitely, because it is unclear how a userspace
filesystem could do anything sensible with those semantics even if
implemented.

Pass fuse_entry_out to fuse_vnode_get when available and only cache lookup
if the user filesystem did not set a zero second TTL.

PR: 230258 (partial)

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22359
Build 21534: arc lint + arc unit