diff options
Diffstat (limited to 'cmds-restore.c')
-rw-r--r-- | cmds-restore.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmds-restore.c b/cmds-restore.c index ade35f0f..f228acab 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -1281,8 +1281,15 @@ 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); + + /* + * Restore won't allocate extent and doesn't care anything + * in extent tree. Skip block group item search will allow + * restore to be executed on heavily damaged fs. + */ fs_info = open_ctree_fs_info(dev, bytenr, root_location, 0, - OPEN_CTREE_PARTIAL); + OPEN_CTREE_PARTIAL | + OPEN_CTREE_NO_BLOCK_GROUPS); if (fs_info) break; fprintf(stderr, "Could not open root, trying backup super\n"); |