diff options
author | Dimitri John Ledkov <xnox@ubuntu.com> | 2018-05-08 14:17:29 -0700 |
---|---|---|
committer | Dimitri John Ledkov <xnox@ubuntu.com> | 2018-05-08 14:17:29 -0700 |
commit | d00c9550da1801a0eaff5cedf4312e24691b31ea (patch) | |
tree | 3881ca1764ef792259e1b70f12c884a3ac0c0715 /cmds-restore.c | |
parent | dab6d2181f1f194ec3a76d900cf2c6533379cbea (diff) |
New upstream release.
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"); |