Repository navigation
fix(inode): write back the reserved bytes an inode was read with - #163
Merged
Merged
Conversation
Inode bytes 204-251 are unused, and every inode rewrite wrote them as zero. A newer version that adds a field there would lose it whenever this one rewrote the inode, as older versions lost the birth generation at 196-203. Decoding now keeps them in Reserved, which encoding writes back. Freeing or claiming a slot still starts from a zeroed inode. FuzzDeserializeInode now checks that an inode re-encodes to the bytes it was read from, and its new seed with reserved bytes set fails that check without this fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # internal/inode/inode.go
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.
Every inode rewrite wrote reserved bytes 212-251 as zero. A future field there would be wiped whenever this build rewrote the inode, which is how older builds lost the birth generation at 196-203. The inode now keeps those bytes as read and writes them back, as #158 did for snapshot descriptors. Freeing or claiming a slot still starts from a zeroed inode.
main is merged in, including #161. Holders keeps bytes 204-211, so Reserved is now 40 bytes (212-251). The merge commit holds that change plus the new test; the first commit's message still says 204-251.
Tests:
🤖 Generated with Claude Code