Skip to content

fix(cache): stop serving stale inodes after cross-node inode reuse - #7

Merged
mattmattox merged 3 commits into
mainfrom
claude/fix-stale-inode-reads-cf2e1f
Oct 24, 2026
Merged

mattmattox merged 3 commits into
mainfrom
claude/fix-stale-inode-reads-cf2e1f

Conversation

@mattmattox

Copy link
Copy Markdown
Contributor

Freeing an inode reset its generation counters, so when a new file reused the inode number, another node's cached inode and extent mappings still passed validation. Reads came back truncated or from the old block. This caused the VM suite's Broadcast Bidirectional and Concurrent Directory Ops failures, and the Broadcast Bidirectional Docker flake seen on #5.

The on-disk format is unchanged. Freed slots now keep their generation bytes, and older binaries and fsck ignore them.

I didn't set go-fuse StableAttr.Gen. go-fuse v2.9.0 gives the kernel unique node IDs, so the kernel never sees an inode number reused.

Tested on the shared test host: unit, -short integration, Docker (40 pass, 1 skip) and VM (45 pass). The new tests fail without the fix.

Not fixed here: ordinary writes never bump DataGeneration, so the extent cache can still go stale after truncate or CoW.

🤖 Generated with Claude Code

mattmattox and others added 3 commits October 24, 2026 03:27
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…test

The container healthcheck lists the mount every 2s, which can cache the
new file's pre-write size in the reader's kernel for up to 1s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattmattox
mattmattox merged commit ed868bc into main Oct 24, 2026
4 of 5 checks passed
mattmattox added a commit that referenced this pull request Oct 24, 2026
…rnal fixes

Cover PRs #5, #6, #7 and #10, which merged to main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mattmattox added a commit that referenced this pull request Oct 24, 2026
…elog, and templates (#9)

* docs: add security policy, contributing guide, code of conduct, changelog, and templates

Adds the community files GitHub expects for a public release:
SECURITY.md (GitHub private vulnerability reporting, main only),
CONTRIBUTING.md, CODE_OF_CONDUCT.md (Contributor Covenant 2.1),
CHANGELOG.md with an Unreleased section, issue templates, and a
pull request template.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: correct build, CI, and changelog claims in community files

Write CONTRIBUTING against main after the CI gates PR: make build also
builds goclusterfs-fsck, and CI adds golangci-lint, govulncheck, a
go mod tidy check, and race/coverage unit tests.

In the changelog, mark SFB, snapshots/clones, and fsck as experimental
with their known issues, say file writes skip the distributed locks,
and narrow the concurrency fix to create/mkdir lock ordering.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(changelog): add upgrade notes for mixed-version clusters

Older binaries zero an inode's generations on free and its extent-tree
generation on rewrite, so all nodes must be upgraded together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(changelog): add CI gates, prototype removal, stale-inode and journal fixes

Cover PRs #5, #6, #7 and #10, which merged to main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant