btrfs-progs: check: Fix lowmem false alert on tree reloc tree
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Mon, 5 Dec 2016 09:07:55 +0000 (17:07 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 14 Dec 2016 14:21:26 +0000 (15:21 +0100)
commitb6aa95677947139e4c90256b49a03519d8a8d114
tree76fedfac85dc315bdbd2ff29584a7e97bd577c40
parent54c8f9152fd98c8b5d5e2c9b32d642cc5855241f
btrfs-progs: check: Fix lowmem false alert on tree reloc tree

Lowmem mode will report false alert if the fs has tree reloc tree like:
ERROR: shared extent[30011392 4096] lost its parent (parent: 30011392,
level: 1)

The problem is check_shared_block_backref() can't handle tree reloc
tree's self-pointing backref.

And still try to read out the tree block then seeking for the
referencer.

The correct method for it is to check if it's tree reloc root.
In that case, we should check found the ROOT_ITEM of tree reloc tree in
root tree.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-check.c