btrfs-progs: check: introduce function to check tree block backref in extent tree
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>
Sat, 23 Apr 2016 06:40:37 +0000 (14:40 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 17 Aug 2016 16:51:19 +0000 (18:51 +0200)
commitae60006cee1c15f87adee22d4595384ea5ab596b
treeb42463cf01e45e99a5147704f7f321bdf6ae2d81
parenta13bfba3e21e0ce78965eb4725a4282c9cf9bb4a
btrfs-progs: check: introduce function to check tree block backref in extent tree

Introduce function check_tree_block_ref() to check whether a tree block
has correct backref in extent tree.

Unlike old extent tree check method, we only use search_slot() to search
reference, no extra structure will be allocated in heap to record what we
have checked.

This method may cause a little more IO, but should work for super large
fs without triggering OOM.

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-check.c