Repository navigation
fix(goclusterfs): make the kernel fetch a file's size again on open - #109
Merged
Merged
Conversation
A read right after open stopped at whatever size this node's kernel had cached for -attr-timeout. When anything on the node looked the file up while another node was writing it, that was a partial size: in the full integration suite on .68, a desktop volume monitor scanned the mount mid rewrite and TestMultiNodeExtentCacheCoherency/TruncateRewrite read 256 KB of a 300 KB file. Open now expires the kernel's cached attributes, so fstat and reads ask for the size, which comes from disk. TestMultiNodeOpenRefreshesCachedSize stats the file on the reader halfway through the write; it fails every run without the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mattmattox
added a commit
that referenced
this pull request
Nov 13, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mattmattox
added a commit
that referenced
this pull request
Nov 13, 2026
* feat: clean API shutdown, /health states, and shared CLI exit codes API shutdown: the server counts every request, closes its listener on Stop, gives requests in flight ShutdownTimeout to finish, then cancels their contexts and closes their connections, and returns only after every handler and the serve goroutine have ended. Mount stops the API before the unmount on SIGINT/SIGTERM and closes the filesystem only after the unmount, in one place; a busy unmount no longer leaves a closed filesystem mounted. /health: device (last I/O failed: unhealthy), journal (corrupt: unhealthy, recovering: degraded), recovery (replaying a crashed peer: degraded) and broadcast (send failing or no multicast and no peers: degraded). Degraded answers 200, unhealthy 503. gfsctl health decodes the 503 body. CLIs: goclusterfs-mount, goclusterfs-fsck and gfsctl share exit codes (0 ok, 8 failure, 16 usage; fsck adds 1 and 4, gfsctl health 1 and 4), error messages say what to do next, and -debug prints [DEBUG] lines in all three. Mount's [DEBUG] lines are now off by default; go-fuse tracing moved to -fuse-debug. fsck no longer exits 2 on a bad flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): keep the "Failed to open device" prefix that tests and logs match Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(logging): fail on [DEBUG] lines that bypass -debug Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(goclusterfs): route #109's debug line through logging.Debugf Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestMultiNodeExtentCacheCoherency/TruncateRewriteread 256 KB of a 300 KB file in the full suite on .68. The data on disk was correct. The reader's ownOpenandReadloggedSize=307200, but its kernel had cachedi_size=262144. That size came from aLookupthat something on the desktop ran mid-rewrite (it also probed.xdg-volume-infoandautorun.inf). The kernel kept it for-attr-timeoutand stopped the read there.Opennow expires the kernel's cached attributes (FUSE_NOTIFY_INVAL_INODEwith offset -1, so no pages are dropped and no inode lock is taken).Tests on .68 (load 33–45; .66 was off limits):
TruncateRewritealone at 30500b7: passed 20/20. It needs a mid-write lookup to fail.TestMultiNodeOpenRefreshesCachedSize: failed 3/3 without the fix with the same 262144-vs-307200 read. With the fix it passed 5/5, then 3/3 again after rebasing onto 8d02d3b.-shortintegration suite: 121/0.goclusterfsunit tests in-short, lint and parity: clean.TestFsckRepairsOlderSharingandTestSFBPersistence: passed 3/3 each. TheirfusermountEBUSY errors are likely gvfs/udisks on .68 probing the mounts.TruncateRewritealready runs in CI's-shortgroup, so this PR doesn't change that.🤖 Generated with Claude Code