diff options
authorJosef Bacik <>2014-10-31 14:01:22 -0400
committerDavid Sterba <>2014-11-14 11:00:17 +0100
commit4fa068bcdb0e6714361b969367d6805fbeeba57d (patch)
parent183a9d4537f8a3ca59a205479e8c112dc8f911a8 (diff)
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 <> Signed-off-by: David Sterba <>
1 files changed, 2 insertions, 1 deletions
diff --git a/disk-io.c b/disk-io.c
index bade5f08..e22122cd 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -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;