forked from Mirrors/btrfs-progs
btrfs-progs: tests: check: detect bad extent item generation
The new image has a bad data extent item generation: item 0 key (13631488 EXTENT_ITEM 4096) itemoff 16230 itemsize 53 refs 1 gen 16384 flags DATA extent data backref root FS_TREE objectid 257 offset 0 count 1 Just like what older `btrfs check --init-extent-tree` could cause. Reviewed-by: Su Yue <Damenly_Su@gmx.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>master
parent
b3621da146
commit
d3f7315b3c
Binary file not shown.
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Due to a bug in --init-extent-tree option, we may create bad generation
|
||||
# number for data extents.
|
||||
#
|
||||
# This test case will ensure btrfs check can at least detect such problem,
|
||||
# just like kernel tree-checker.
|
||||
|
||||
source "$TEST_TOP/common"
|
||||
|
||||
check_prereq btrfs
|
||||
|
||||
check_image() {
|
||||
run_mustfail \
|
||||
"btrfs check failed to detect invalid extent item generation" \
|
||||
"$TOP/btrfs" check "$1"
|
||||
}
|
||||
|
||||
check_all_images
|
Loading…
Reference in New Issue