-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs-progs: add rudimentary log checking
Currently the transaction log is more or less ignored by btrfs check, meaning that it's possible for a FS with a corrupt log to pass btrfs check, but be immediately corrupted by the kernel when it's mounted. This patch adds a check that if there's an inode in the log, any pending non-inlined csumed writes also have corresponding csum entries. Signed-off-by: Mark Harmstone <[email protected]> [ Small commit message update. ] Signed-off-by: Qu Wenruo <[email protected]>
- Loading branch information
1 parent
261f25b
commit f396c03
Showing
3 changed files
with
298 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# | ||
# Verify that check can detect missing log csum items. | ||
|
||
source "$TEST_TOP/common" || exit | ||
|
||
check_prereq btrfs | ||
|
||
check_image() { | ||
run_mustfail "missing log csum items not detected" \ | ||
"$TOP/btrfs" check "$1" | ||
} | ||
|
||
check_all_images |