Files
seaweedfs/weed/mount
Yip LeoandClaude Opus 5.5 71b1911e44 mount: answer statfs from the stats at hand, refresh them in the background (#13337)
StatFs asked the filer for Statistics whenever its stats were older than
20 s and waited for the answer, up to the 20 s filer RPC timeout, so a
slow filer or master held statfs for that long. A node agent that probes
mounts with a bounded statfs, as the CSI driver's health monitor does
with 5 s, took such a mount for hung and restarted it, on every node at
once when the filer was slow for all of them. Every concurrent statfs
also sent its own request while the stats were stale.

StatFs now answers from the stats it has and starts a refresh in the
background when they are older than 20 s, one at a time. Only the first
statfs waits, for the first refresh. A refresh the filer does not answer
keeps the last known stats, as before, and the next one starts 20 s after
it.

The stats are now read and written under a lock: the refresh and the
quota check write them while statfs and the quota check read them.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 10:39:23 -08:00
..
2026-02-20 18:42:00 -08:00

Concurrent writers to one file from different mounts require -dlm; without it, a conflicting write fails with EIO and the file may refuse further appends until reopened after the cache drops.