path: root/cmds-restore.c
diff options
authorJosef Bacik <>2013-10-23 16:24:03 -0400
committerChris Mason <>2013-11-07 13:29:30 -0500
commit337f86fea1d06e189f3cf234adba2567a07678bd (patch)
treec4fe5f392480000ffbf2419d2ba53568153e304a /cmds-restore.c
parent4fc17596aaa2b03ee38c467585465923d62b1510 (diff)
Btrfs-progs: add -b to btrfsck to look at backup roots
In some cases the tree root is so hosed we can't get anything useful out of it. So add the -b option to btrfsck to make us look for the most recent backup tree root to use for repair. Then we can hopefully get ourselves into a working state. Thanks, Signed-off-by: Josef Bacik <> Signed-off-by: Chris Mason <>
Diffstat (limited to 'cmds-restore.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-restore.c b/cmds-restore.c
index ae0527b6..e315d2e6 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -974,7 +974,7 @@ static struct btrfs_root *open_fs(const char *dev, u64 root_location,
for (i = super_mirror; i < BTRFS_SUPER_MIRROR_MAX; i++) {
bytenr = btrfs_sb_offset(i);
- fs_info = open_ctree_fs_info(dev, bytenr, root_location, 0, 1);
+ fs_info = open_ctree_fs_info(dev, bytenr, root_location, 0, 1, 0);
if (fs_info)
fprintf(stderr, "Could not open root, trying backup super\n");