btrfs-progs/tests/fsck-tests/020-extent-ref-cases
Su Yue e6203e6ff9 btrfs-progs: fsck-tests: add test case with keyed data backref with reloc tree blocks
For trees have been balanced, leaves are with flag BTRFS_HEADER_FLAG_RELOC and
extent data backrefs are shared. Like:
=====================
       item 0 key (11927552 EXTENT_ITEM 524288) itemoff 3932 itemsize 63
                refs 129 gen 7 flags DATA
                shared data backref parent 35897344 count 41
                shared data backref parent 35426304 count 37
                shared data backref parent 35422208 count 51
=====================

Then make the leaf which owns the extent data cowed. The shared data
backref was to transferred to keyed data ref, but remaining backrefs are
still shared. Like:
=====================
        item 0 key (11927552 EXTENT_ITEM 524288) itemoff 3887 itemsize 108
                refs 129 gen 7 flags DATA
                extent data backref root 5 objectid 258 offset 0 count 40
                extent data backref root 5 objectid 257 offset 0 count 1
                shared data backref parent 35426304 count 37
                shared data backref parent 35422208 count 51
=====================

However lowmem mode used to iterate the whole inode to find all
references, and doesn't care if a reference is already counted by the
shared tree block.

Add the test case to check it.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-08-06 15:03:16 +02:00
..
block_group_item_false_alert.raw.xz
extent_data_ref.img btrfs-progs: fsck-tests: Introduce test case with keyed data backref with the extent offset 2018-03-30 22:15:53 +02:00
inline_regular_coexist.img
keyed_block_ref.img
keyed_data_ref.img
keyed_data_ref_only.img btrfs-progs: fsck-test: Introduce test case for false data extent backref lost 2018-01-03 17:09:15 +01:00
keyed_data_ref_with_reloc_leaf.img btrfs-progs: fsck-tests: add test case with keyed data backref with reloc tree blocks 2018-08-06 15:03:16 +02:00
keyed_data_ref_with_shared_leaf.img btrfs-progs: fsck-tests: Introduce test case with keyed data backref with shared tree blocks 2018-01-03 17:09:27 +01:00
no_inline_ref.img
no_skinny_ref.img
ref_count_mismatch_false_alert.img
shared_block_ref.img
shared_block_ref_only.raw.xz btrfs-progs: fsck-test: Add new image with shared block ref only metadata backref 2018-01-03 17:09:23 +01:00
shared_data_ref.img
shared_data_ref_only.img
test.sh btrfs-progs: tests: remove trivial use of local variables 2018-03-30 22:15:55 +02:00