Repository navigation
feat(fsck): free inodes no directory names in -repair - #86
Merged
Merged
Conversation
Replay leaves an inode without a name when it skips an unlink's ExtentFree and InodeDelete, for example after another node wrote a file that was unlinked while open there. Phase 8 now reports each such inode once, and repair frees it the way unlink does: the inode first, then its blocks through the runtime's extent manager and refcounts, so a block a clone or snapshot also maps only loses one owner. Repair keeps reserved inodes, inodes a snapshot refers to, directories that are not empty and files that map small-file slots. It keeps all of them when a directory, inode or snapshot descriptor cannot be read, when a phase it needs did not finish, or when a journal needs replay. "." and ".." no longer count as names, so an unnamed directory is found too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mattmattox
added a commit
that referenced
this pull request
Nov 13, 2026
* fix(broadcast): count multicast failures in a row and retry after a pause The failure counter never reset, so after 3 failed multicast sends in total over a mount, a node sent invalidations only to unicast peers until it unmounted. Now a successful send resets the count, and after MaxMulticastFailures failures in a row the node sends only to unicast peers for 30 seconds before it tries multicast again. The total stays in TransportStats; /metrics does not export broadcast counters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(journal): remove the unused FullThreshold setting Nothing read it. A checkpoint already runs every 5 seconds and is forced when a transaction does not fit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(mount): log that SFB is disabled and stop creating its unused manager -sfb defaulted to true and logged "SFB: enabled", but nothing used the SFB manager it created: writes never allocate slots, and reading, migrating and freeing old slots does not go through it. Mount now logs what is in effect and still accepts -sfb. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: raise the integration test timeout and fix stale help text make test-integration ran the full suite with a 5 minute timeout; it takes about 15 minutes, so allow 30 and say so in make help. goclusterfs-fsck -h said repair never frees blocks or deletes inodes, which changed with #72 and #86, and the api package doc called the API read-only, which changed with #57. 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.
Repair now frees unnamed inodes (left behind when replay skips an unlink's records, as in #80) through the runtime's
inode.Table.Freeandextent.Manager.Deletewith refcounts set, so clone and snapshot blocks lose one owner and stay allocated. There is nolost+found, so a freed file's data is gone; the docs say to read-dry-runfirst.Behaviour changes:
.and..no longer count as names, so unnamed directories are found. Each unnamed inode is reported once, in phase 8, instead of in phases 6 and 8. A snapshot data inode that no snapshot refers to is freed too. Freeing an empty unnamed directory can leave its old parent's link count one too high, because the parent still counts the freed directory's... fsck does not check or fix directory link counts.Tested on .66 at 50276ce: race unit tests for
fsckandgoclusterfspass, integration-short119 passed and 0 failed, lint 0 issues, parity passes. A mutation check per keep rule and gate (9 in total) makes a test fail. The replay tests take about 16 s each, like the existing crash tests, because of the 15 s dead-node lock takeover.🤖 Generated with Claude Code