summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2017-11-22 17:03:25 +0800
committerDavid Sterba <dsterba@suse.com>2018-01-03 17:09:27 +0100
commit263184c7d286efe5200939686818400d0e3afa5d (patch)
treee74306244cd4586ff7da6b0109d49cfc592a960b /tests
parentee147df75f71b87ad9c505a71deaacc3b78b3632 (diff)
btrfs-progs: fsck-tests: Introduce test case with keyed data backref with shared tree blocks
For snapshot shared tree blocks with source subvolume, the keyed backref counter only counts the exclusive owned references. In the following case, 258 is a snapshot of 257, which inherits all the reference to this data extent. ------ item 4 key (12582912 EXTENT_ITEM 524288) itemoff 3741 itemsize 140 refs 179 gen 9 flags DATA extent data backref root 257 objectid 258 offset 0 count 49 extent data backref root 257 objectid 257 offset 0 count 1 extent data backref root 256 objectid 258 offset 0 count 128 extent data backref root 256 objectid 257 offset 0 count 1 ------ 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: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/fsck-tests/020-extent-ref-cases/keyed_data_ref_with_shared_leaf.imgbin0 -> 19456 bytes
1 files changed, 0 insertions, 0 deletions
diff --git a/tests/fsck-tests/020-extent-ref-cases/keyed_data_ref_with_shared_leaf.img b/tests/fsck-tests/020-extent-ref-cases/keyed_data_ref_with_shared_leaf.img
new file mode 100644
index 00000000..2ce5068f
--- /dev/null
+++ b/tests/fsck-tests/020-extent-ref-cases/keyed_data_ref_with_shared_leaf.img
Binary files differ