Btrfs-progs: add --init-extent-tree to btrfsck
authorJosef Bacik <jbacik@fusionio.com>
Fri, 17 May 2013 13:34:23 +0000 (09:34 -0400)
committerChris Mason <chris.mason@fusionio.com>
Wed, 19 Jun 2013 17:52:34 +0000 (13:52 -0400)
commit439ce45e4880c1f741bf4b0681d6c476e43760b2
tree0edec57a99f409111a2aaae9d9716aaac69e7bec
parentf5201efdb0955eb8070021989371a48eeab5d3b2
Btrfs-progs: add --init-extent-tree to btrfsck

In some cases the extent tree can just be so gone there is no point in trying to
figure out how to put it back together.  So add a --init-extent-tree mode which
will zero out the extent tree and then re-add extents for all of the blocks we
find.  This will also undo any balance that was going on at the time of the
crash, this is needed because the reloc tree seems to confuse fsck at the
moment.  With this patch I can put back together a users file system that was
completely gone.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
cmds-check.c
ctree.c
ctree.h
extent-tree.c