btrfs-progs: check: introduce repair_tree_block_ref()
authorSu Yue <suy.fnst@cn.fujitsu.com>
Fri, 1 Sep 2017 06:26:12 +0000 (14:26 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 Oct 2017 18:33:01 +0000 (20:33 +0200)
commit4eb10e473e447f094c390577a1ae91896dde8a2e
tree4312aba844233c50ad394849851d27e0b66b5da5
parenta8ede30f93ad3f2c64b93f93713d89b15d5077a1
btrfs-progs: check: introduce repair_tree_block_ref()

The only thing repair_tree_block_ref() does is that it adds backref of the
tree_block. Just like what original repair do:

It first searches the corresponding extent item then

1. If the extent item exists but backref is missing, add one backref to the
   extent.
2. if found nothing, just add an extent item and add one backref.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-check.c