btrfs-progs: rebuild the crc tree with --init-csum-tree
authorJosef Bacik <jbacik@fb.com>
Wed, 1 Oct 2014 14:34:51 +0000 (10:34 -0400)
committerDavid Sterba <dsterba@suse.cz>
Fri, 10 Oct 2014 08:38:34 +0000 (10:38 +0200)
commit9ecbbe30ec29bc6d75cf4785081a20b8beeb6ba5
tree4415fafbc5aa403c1a6bfa7ace3ef95cc369bb71
parent3638e1080051804220db05cdd24ccc50bd8e46c0
btrfs-progs: rebuild the crc tree with --init-csum-tree

We have --init-csum-tree, which just empties the csum tree.  I'm not sure why we
would ever need this, but we definitely need to be able to rebuild the csum tree
in some cases.  This patch adds the ability to completely rebuild the crc tree
by reading all of the data and adding csum entries for them.  This patch doesn't
pay attention to NODATASUM inodes, it'll happily add csums for everything.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-check.c