diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-10-28 14:28:43 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-11-07 16:10:40 -0500 |
commit | 4735d0bb8248a3900f420cb9144e4f7969f0b44d (patch) | |
tree | febecdd28a64d93816e63a1bf36d6864a732dcd8 /cmds-restore.c | |
parent | 337f86fea1d06e189f3cf234adba2567a07678bd (diff) |
Btrfs-progs: rework open_ctree to take flags, add a new one V2
So I needed to add a flag to not try to read block groups when doing
--init-extent-tree since we could hang there, but that meant adding a whole
other 0/1 type flag to open_ctree_fs_info. So instead I've converted it all
over to using a flags setting and added the flag that I needed. This has been
tested with xfstests and make test. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'cmds-restore.c')
-rw-r--r-- | cmds-restore.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmds-restore.c b/cmds-restore.c index e315d2e6..1748262b 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -974,7 +974,8 @@ 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, 0); + fs_info = open_ctree_fs_info(dev, bytenr, root_location, + OPEN_CTREE_PARTIAL); if (fs_info) break; fprintf(stderr, "Could not open root, trying backup super\n"); |