btrfs-progs: test/fsck: Introduce test images containing tree reloc tree

Reloc tree is a special tree with very short life span.  It acts as a
special snapshot for any tree, with related nodes/leaves or EXTENT_DATA
modified to point to new position.

Considering the short life span and its special purpose, it should be
quite reasonable to keep them as both corner case for fsck and
educational dump for anyone interested in relocation.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2017-11-10 09:34:17 +08:00 committed by David Sterba
parent 5ee1956b89
commit 4e4c5d3549
3 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#!/bin/bash
# Make sure btrfs check won't report any false alerts for valid image with
# reloc tree.
#
# Also due to the short life span of reloc tree, save the as dump example for
# later usage.
source "$TOP/tests/common"
check_prereq btrfs
check_image() {
local image
image=$1
run_check "$TOP/btrfs" check "$image"
}
check_all_images