Btrfs-progs: don't fail on log tree opening with PARTIAL

We were failing to fsck a volume because we couldn't open the log tree, which is
not helpful.  Make us skip erroring out if we are using OPEN_CTREE_PARTIAL since
it isn't a mandatory tree.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
master
Josef Bacik 2014-10-31 14:01:22 -04:00 committed by David Sterba
parent 183a9d4537
commit 4fa068bcdb
1 changed files with 2 additions and 1 deletions

View File

@ -937,7 +937,8 @@ int btrfs_setup_all_roots(struct btrfs_fs_info *fs_info, u64 root_tree_bytenr,
ret = find_and_setup_log_root(root, fs_info, sb);
if (ret) {
printk("Couldn't setup log root tree\n");
return -EIO;
if (!(flags & OPEN_CTREE_PARTIAL))
return -EIO;
}
fs_info->generation = generation;