btrfs-progs: check: introduce function to speed up fs tree check
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>
Sun, 24 Apr 2016 07:24:56 +0000 (15:24 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 17 Aug 2016 16:51:21 +0000 (18:51 +0200)
commit3974c9117e7fd3a81bf3baa5da1b5320dddb5e38
treec65e79dbd4054d79d88b2b43e7c14d1004d84060
parentfbf33f2ffdc85765c6c653f1a507b3e01154d30d
btrfs-progs: check: introduce function to speed up fs tree check

Introduce function should_check() to reduced duplicated tree block check
for fs/subvolume tree.

The idea is, we only check the fs/subvolue tree block if we have the
lowest referencer rootid, according to extent tree.

In that case, we can skip a lot of fs/subvolume tree block checks if
there are a lot of snapshots.

Although we will do a lot of extent tree searches for it.

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