e6203e6ff9
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> |
||
---|---|---|
.. | ||
block_group_item_false_alert.raw.xz | ||
extent_data_ref.img | ||
inline_regular_coexist.img | ||
keyed_block_ref.img | ||
keyed_data_ref.img | ||
keyed_data_ref_only.img | ||
keyed_data_ref_with_reloc_leaf.img | ||
keyed_data_ref_with_shared_leaf.img | ||
no_inline_ref.img | ||
no_skinny_ref.img | ||
ref_count_mismatch_false_alert.img | ||
shared_block_ref.img | ||
shared_block_ref_only.raw.xz | ||
shared_data_ref.img | ||
shared_data_ref_only.img | ||
test.sh |