- A failed statvfs was cached as a success: for the next cache.statfs
seconds every caller got the entry's old or zeroed stats and create
policies chose branches from them. Keep a failure as an error for the
timeout, like a success, so a slow failing branch isn't retried under
the lock by every caller in turn. Document that the branch then stays
excluded from space-based create policies until the timeout expires.
- A new entry was told apart from a fresh one only by a time of 0, so a
timeout of at least the current time in seconds returned the zeroed
struct as success. Give entries a valid flag set by the first
statvfs, and measure age with a steady clock from when statvfs
returned.
- cache.statfs given at mount was stored but never applied. Bind the
option directly to the atomic the cache reads, so mount options,
config files and control-file updates follow one path and concurrent
readback no longer races with updates.
- tests.cpp checks that a cached failure is never served as success,
that failures are kept until the timeout, huge timeouts, an invalid
update keeping a cached ENOENT, and a timeout of 0 exposing a newly
created directory immediately.