Repository navigation
Description
Nine fields on internal/fuse.MountOptions and internal/fuse.Config were settable, carried yaml tags, named real-sounding FUSE capabilities, and were read by nothing. They are removed in v0.10.1 rather than left in place, because a field a caller can set to no effect is indistinguishable from a working one — the same defect class as the s3.Config fields removed earlier in the release (DisableSSL, TargetThroughput, OptimizationLevel).
Removed from MountOptions: DirectIO, KeepCache, BigWrites, MaxRead, AsyncRead, WritebackCache, SpliceRead, SpliceWrite, SpliceMove.
Removed from Config: AllowOther, DirectIO, KeepCache, BigWrites, MaxRead, MaxWrite, ReadAhead, WriteBuffer, Concurrency.
Removing the yaml tags breaks no config file. Nothing has ever decoded YAML into either struct: the only decode target is config.Configuration, whose ten top-level keys contain no FUSE section. A fuse: block in a config file was never read, and under the strict decoding added in v0.10.1 it would now be rejected outright.
Two of the nine were also not implementable as written:
MaxReadis not a field on go-fuse'sfuse.MountOptionsat all. go-fuse passesmax_readas a string mount option and sets it equal toMaxWrite, so the read size is not separately settable.internal/fuse/doc.gopreviously justified keeping the field on the grounds that "removing a YAML key breaks existing config files" — a key no loader read.BigWritesnames a FUSE capability that has been unconditional since kernel 4.20.
What is worth plumbing for real
Four of the removed flags name genuine go-fuse capabilities with observable effects. Each needs the plumbing and a test that fails without it, which is the part that was missing before:
| flag | go-fuse mechanism | what a test would assert |
|---|---|---|
DirectIO |
FOPEN_DIRECT_IO in FileNode.Open's returned fuseFlags |
reads bypass the kernel page cache: a second read(2) of the same offset reaches FileHandle.Read rather than being served by the kernel |
KeepCache |
FOPEN_KEEP_CACHE |
the kernel retains cached pages across open(2), so a re-open does not re-issue reads |
WritebackCache |
fuse.MountOptions.ExplicitDataCacheControl plus the writeback capability |
small sequential writes coalesce into fewer, larger WRITE requests |
SpliceRead / DisableSplice |
fuse.MountOptions.DisableSplice |
bytes-transferred and syscall counts, not latency |
AsyncRead inverts to go-fuse's SyncRead, which is the flag that actually exists — worth exposing under the name of the field that controls it, not the one it negates.
ReadAhead, WriteBuffer, and Concurrency on Config are not in this table: the read-ahead window is configured through internal/fuse.ReadAheadConfig (see #176, #177), the write path sizes its own buffers in internal/vfs, and nothing in the FUSE layer bounds concurrency — go-fuse's MaxBackground does, and it is not what that field was named after.
Acceptance
- Each plumbed flag reaches the go-fuse option or the returned
fuseFlagsit corresponds to. - Each has a test asserting the effect — request counts, bytes transferred, or which layer served a read — not that the field was copied. A test that checks
opts.DirectMount == cfg.DirectIOwould have passed on the removed code just as well, and that is why nine dead fields survived to a release. internal/fuse/doc.go's configuration example lists only fields that take effect, and says so as a property of the type.
Activity
scttfrdmn commentedon Aug 3, 2026
Implemented in #261. Two notes on where it departs from the issue text, both deliberate.
sync_read, notasync_read. The table above proposes exposing "the flag that actually exists" and then namesAsyncRead, which is the one that doesn't — go-fuse's field isSyncRead. That is not just a spelling matter:AsyncReadis the negation, soasync_read: false— the value a half-filled config file produces, and the value someone writes meaning "leave this alone" — is the one that serializes every read. The key issync_read, which makes the dangerous value the one an operator has to type on purpose.It also settles the defaults. All three fields are false by default, false is the kernel's own behavior for each, and
config.NewDefaulttherefore names nofusesection at all — the zero value is the default, and a second place for a default to live is how the last set of these drifted.Two of the four are not plumbable. Both are recorded in the code at the field that would have carried them, rather than dropped in silence:
trySplicetype-asserts theReadResultto a seekable or stateful result and bails otherwise.FileHandle.Readreturnsfuse.ReadResultDataat all four of its return sites, because the bytes come from S3 or from an in-memory cache — there is no fd to splice from.DisableSplicewould disable a path this filesystem never takes: a config key whose effect is provably nothing.fuse.MountOptions.ExplicitDataCacheControl, which per go-fuse's own documentation makes the filesystem "fully responsible for invalidating data cache." GreppingNotifyContent|NotifyEntry|NotifyInvalacross this repository returns zero hits, so enabling it would convert bounded staleness into permanent staleness. (There is noWritebackCachefield onfuse.MountOptionsat all, andCAP_WRITEBACK_CACHEappears only in go-fuse's own types and printer — never set.)Acceptance, item by item:
Each plumbed flag reaches the option or
fuseFlagsit corresponds to.direct_io→FOPEN_DIRECT_IOandkeep_cache→FOPEN_KEEP_CACHEfromFileSystem.openFlags, returned by bothOpenandCreate;sync_read→fuse.MountOptions.SyncRead.direct_iowins if both open-time flags are set, rather than the two being OR'd — they are contradictory instructions and the kernel's response to both is not a thing to leave to the kernel.Each has a test asserting the effect, not the copy. This is the criterion that shaped the change. The kernel-facing assertions go through
fs.NewNodeFS, whoserawBridge.Opencopies a node'sfuseFlagsinto theOpenOutthe kernel receives, so a mount-free test reads the actual kernel-facing value. The kernel's half — whether a secondread(2)at the same offset arrives, whether pages surviveopen(2)— needs/dev/fuse, so it is behind afuse_mountbuild tag with amake test-fuse-mounttarget, counting READ requests rather than timing anything. Those fail rather than skip when the device is absent, because a test that skips itself reports success, and CI compiles the tag it cannot run (tests: four build tags carry code nothing compiles, and three of them are broken #240 is the general version of that).SyncReadis the one honest exception, and it is labeled as such in the test. go-fuse converts it toDisabledCapabilities |= CAP_ASYNC_READinsideMountOptions.setDefaults, which is unexported and whichNewServerruns on a private copy;Server.KernelSettings()returns the kernel's INIT request, not the server's reply. The derived mask is unreachable from a test without a mount, so the seam test checks the copy and says why.doc.golists only fields that take effect, as a property of the type. Done, and the two unplumbable flags are named there with the reason, so the absence reads as a decision rather than an oversight.Each of the four seams was verified by mutation — the mapping deleted or reverted to v0.10.0's actual code, and the intended test watched to fail with its intended message:
openFlags()→ the literal0, 0that shippedAdapter.buildMountOptionsplatform.gocopy deletedyaml:"fuse"→yaml:"-"TestLoadFromFileReadsTheFUSESectionfailsThat third row is the whole issue in miniature. The mapping lived inside
Adapter.Startas a struct literal, where nothing short of a live mount could observe it — which is why it is now a method, and why nine fields could be settable and inert through a release.feat: the FUSE options a config file names reach the kernel (#180) (#261
feat(release): the tarball carries the mount helper, and install.sh c…
docs(fuse): record what the fuse_mount suite found on the runner, and…