Repository navigation
feat(fsck): check ".", and repair a wrong "." or ".." - #190
Merged
Merged
Conversation
Phase 6 recorded ".." but not ".", so a "." naming another inode, or none at all, went unreported. It now reports both, with the inode numbers. Repair now points a wrong "." at the directory itself and a wrong ".." at the directory that names it, found by walking the names down from the root. It leaves ".." alone when the directory has more than one name or the walk does not reach it, and changes an entry only if it still names the inode phase 6 read. A missing entry is reported but not added. 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.
#181 already reports a wrong
.., with both inode numbers, and..loops. Two parts were missing:.was never checked (itscase "."was empty), and repair left directories alone.Phase 6 now reports a missing
.or one that names another inode. Repair:.at the directory itself;..at the directory that names it, found by walking the names down from the root;..alone when the directory has more than one name or the walk doesn't reach it;dir.PointIf).Missing entries are reported, not added.
-dry-runwrites nothing.The test uses a real rename (
p1/dtop2/e), then puts..back at p1 and points p2's.at p1. It checks the dry run, the repair, and a clean check after. It fails on main. fsck and the full goclusterfs suite pass on .66. The docs no longer say repair never edits directories.🤖 Generated with Claude Code