btrfs-progs: Make csum tree rebuild works with extent tree rebuild.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Mon, 26 Jan 2015 05:53:02 +0000 (13:53 +0800)
committerDavid Sterba <dsterba@suse.cz>
Fri, 27 Feb 2015 16:32:22 +0000 (17:32 +0100)
commit25db1dd11de2f255894896d691121795c60ee2bb
treef32b7d0a3048399904ac4a75f9091913a97b289a
parent7a7d5f019f9998912ead63d3491407d2218e9874
btrfs-progs: Make csum tree rebuild works with extent tree rebuild.

Before this patch, csum tree rebuild will not work with extent tree
rebuild, since extent tree rebuild will only build up basic block
groups, but csum tree rebuild needs data extents to rebuild.
So if one use btrfsck with --init-csum-tree and --init-extent-tree, csum
tree will be empty and tons of "missing csum" error will be outputted.

This patch allows csum tree rebuild get its data from fs/subvol trees
using regular file extents (which is also the only one using csum tree
currently).

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
[renamed to fill_csum_tree_from_one_fs_root]
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-check.c