btrfs-progs: tests/fsck: add test image with invalid metadata backref level
The image has a key in extent tree, (30457856 METADATA_ITEM 256), which has invalid level (256 > BTRFS_MAX_LEVEL). Make sure check can at least detect such problem. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
1a8f283c97
commit
2f734d7b2c
Binary file not shown.
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Verify that check can detect invalid metadata backref level.
|
||||
#
|
||||
# There is a report that btrfs-check original mode doesn't report invalid
|
||||
# metadata backref level, and lowmem mode would just crash.
|
||||
#
|
||||
# Make sure btrfs check can at least detect such error.
|
||||
|
||||
source "$TEST_TOP/common"
|
||||
|
||||
check_prereq btrfs
|
||||
|
||||
check_image() {
|
||||
run_mustfail "invalid metadata backref level not detected" \
|
||||
"$TOP/btrfs" check "$1"
|
||||
}
|
||||
|
||||
check_all_images
|
Loading…
Reference in New Issue