btrfs-progs/tests/fsck-tests
Qu Wenruo 263184c7d2 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>
2018-01-03 17:09:27 +01:00
..
001-bad-file-extent-bytenr
002-bad-transid
003-shift-offsets
004-no-dir-index btrfs-progs: tests: Allow check test to repair in lowmem mode for certain errors 2017-10-16 20:33:00 +02:00
005-bad-item-offset
006-bad-root-items btrfs-progs: tests: add variable quotation to fsck-tests 2017-05-02 16:13:29 +02:00
007-bad-offset-snapshots
008-bad-dir-index-name
009-no-dir-item-or-index btrfs-progs: tests: Allow check test to repair in lowmem mode for certain errors 2017-10-16 20:33:00 +02:00
010-no-rootdir-inode-item btrfs-progs: tests: Allow check test to repair in lowmem mode for certain errors 2017-10-16 20:33:00 +02:00
011-no-inode-item btrfs-progs: tests: Allow check test to repair in lowmem mode for certain errors 2017-10-16 20:33:00 +02:00
012-leaf-corruption btrfs-progs: tests: Use '-t btrfs' mount option in tests 2017-07-20 19:46:11 +02:00
013-extent-tree-rebuild btrfs-progs: tests: don't pass size to prepare_test_dev if not necessary 2017-11-14 15:59:00 +01:00
014-no-extent-info
016-wrong-inode-nbytes btrfs-progs: tests: Allow check test to repair in lowmem mode for certain errors 2017-10-16 20:33:00 +02:00
017-missing-all-file-extent btrfs-progs: tests: Allow check test to repair in lowmem mode for certain errors 2017-10-16 20:33:00 +02:00
018-leaf-crossing-stripes btrfs-progs: tests: add variable quotation to fsck-tests 2017-05-02 16:13:29 +02:00
019-non-skinny-false-alert btrfs-progs: tests: add variable quotation to fsck-tests 2017-05-02 16:13:29 +02:00
020-extent-ref-cases btrfs-progs: fsck-tests: Introduce test case with keyed data backref with shared tree blocks 2018-01-03 17:09:27 +01:00
021-partially-dropped-snapshot-case btrfs-progs: tests: add variable quotation to fsck-tests 2017-05-02 16:13:29 +02:00
022-qgroup-rescan-halfway btrfs-progs: tests: add variable quotation to fsck-tests 2017-05-02 16:13:29 +02:00
023-qgroup-stack-overflow btrfs-progs: tests: add variable quotation to fsck-tests 2017-05-02 16:13:29 +02:00
024-clear-space-cache btrfs-progs: tests: don't pass size to prepare_test_dev if not necessary 2017-11-14 15:59:00 +01:00
025-file-extents btrfs-progs: tests: Add test case to check file hole extents with NO_HOLES flag 2017-06-26 17:10:02 +02:00
026-bad-dir-item-name btrfs-progs: fsck-test: case for corrupted dir item name 2017-08-24 19:07:58 +02:00
027-bad-extent-inline-ref-type btrfs-progs: fsck-tests: 027/bad_extent_inline_ref_type 2017-11-14 15:59:00 +01:00
028-unaligned-super-dev-sizes btrfs-progs: tests: extend fsck/028 to test fix-device-size and mount 2017-11-14 15:59:00 +01:00