Btrfs-progs: make restore deal with really broken file systems
authorJosef Bacik <jbacik@fusionio.com>
Tue, 16 Apr 2013 17:13:38 +0000 (13:13 -0400)
committerDavid Sterba <dsterba@suse.cz>
Tue, 23 Apr 2013 16:56:27 +0000 (18:56 +0200)
commitaa5f0626f8a7797278e55e9976c2e868962af8da
tree9c6107453dfc48f69352d39e3ff7113415454004
parent18ce0501ce8a6bc2d66b6bf11358d284919c5d3c
Btrfs-progs: make restore deal with really broken file systems

All we need for restore to work is the chunk root, the tree root and the fs root
we want to restore from.  So to do this we need to make a few adjustments

1) Make open_ctree_fs_info fail completely if it can't read the chunk tree.
There is no sense in continuing if we can't read the chunk tree since we won't
be able to translate logical to physical blocks.

2) Use open_ctree_fs_info in restore, and if we didn't load a tree root or
fs root go ahead and try to set those up manually ourselves.

This is related to work I did last year on restore, but it uses the
open_ctree_fs_info instead of my open coded open_ctree.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
cmds-check.c
cmds-restore.c
debug-tree.c
disk-io.c
disk-io.h