Repository navigation
test: power-cut tests for CoW, snapshots, clones and TRIM; fix orphan snapshot inode reports - #129
Merged
Merged
Conversation
A write gate lets the first N device writes land and refuses the rest, for every N of an operation; the image is then remounted with journal replay and snapshot recovery, and fsck may find only leaks, which repair fixes. A journal test loses the last sector of the last record. VM tests cut power during copy-on-write, snapshot and TRIM workloads, with discard passed through to the shared disk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s place Commit writes the record, then the superblock with the new tail, with no flush between them. If the superblock lands and the record does not, the sector still holds a record from the previous mount or the previous lap, with a valid checksum, and recovery replays it. Both tests fail until recovery checks each record's generation and sequence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fsck free orphan data inodes A snapshot or clone claimed an inode slot and wrote its mode in a second write, so a crash between them left an inode with no file type, which fsck reported as an error. The claim now writes the final mode and flags. A crash while a snapshot is created or deleted can still leave its data inode with no descriptor. Phase 7 now reports it as fixable, with wording true for both, and marks it repaired when phase 8 frees the inode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… VM CoW test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ailure test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
They fail until recovery checks each record's generation and sequence, which the journal's own PR adds together with ed0b38e's tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…review # Conflicts: # tests/vm/scripts/run-vm-tests.sh
A TRIM batch size of MaxInt32 preallocated 32 GB per manager, which the race detector made resident. Under -race the harness now cuts power at 48 evenly spread writes instead of every write. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…review # Conflicts: # internal/goclusterfs/fs.go # tests/test-manifest.yaml
The operations a power cut interrupts discard their errors on purpose. 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.
Crash-injection review before release. A device write gate lets the first N writes of an operation land and refuses the rest, for every N. The image is then remounted in mount order (journal replay, then snapshot recovery). fsck may find only leaks, and repair must leave it clean. Acknowledged data and snapshots must be unchanged.
Under
-race, at most 48 evenly spread cuts run per operation.Fixed here. A snapshot or clone claimed an inode in one write and set its mode in a second, so a crash between them left a typeless inode, which fsck called an ERROR. The claim now writes the final fields. Phase 7 now marks a data inode with no snapshot as fixable, with wording true for create and delete, and marks it repaired when phase 8 frees it.
Found, fixed in #123. Journal recovery replayed a stale record from the previous mount or the previous lap in place of a lost record. The tests for it went to the journal fix, and main now has them.
TRIM review. I found no double free and no wrong-block discard.
VM. The shared disk now passes
discard=unmap, so TRIM runs in every VM test. New power-failure tests cover a CoW loop, snapshot create/delete and TRIM reuse. The full 2-node suite on .66 passed 63/0 at 37dca71, before main's later changes such as the directory index (#127) were merged in.🤖 Generated with Claude Code