From 337f86fea1d06e189f3cf234adba2567a07678bd Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Wed, 23 Oct 2013 16:24:03 -0400 Subject: 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 --- cmds-restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds-restore.c') 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) break; fprintf(stderr, "Could not open root, trying backup super\n"); -- cgit v1.2.3