Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189468
b: refs/heads/master
c: 1b1d1f6
h: refs/heads/master
v: v3
  • Loading branch information
Josef Bacik authored and Chris Mason committed Mar 31, 2010
1 parent 44d89ca commit 43eea3d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6cf8bfbf5e88edfb09a2bf0631a067060f534592
refs/heads/master: 1b1d1f6625e517a08640ddb4b8f8a0e025243fe3
11 changes: 8 additions & 3 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,11 @@ struct btrfs_root *open_ctree(struct super_block *sb,

csum_root->track_dirty = 1;

btrfs_read_block_groups(extent_root);
ret = btrfs_read_block_groups(extent_root);
if (ret) {
printk(KERN_ERR "Failed to read block groups: %d\n", ret);
goto fail_block_groups;
}

fs_info->generation = generation;
fs_info->last_trans_committed = generation;
Expand All @@ -1932,7 +1936,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
fs_info->cleaner_kthread = kthread_run(cleaner_kthread, tree_root,
"btrfs-cleaner");
if (IS_ERR(fs_info->cleaner_kthread))
goto fail_csum_root;
goto fail_block_groups;

fs_info->transaction_kthread = kthread_run(transaction_kthread,
tree_root,
Expand Down Expand Up @@ -2020,7 +2024,8 @@ struct btrfs_root *open_ctree(struct super_block *sb,
filemap_write_and_wait(fs_info->btree_inode->i_mapping);
invalidate_inode_pages2(fs_info->btree_inode->i_mapping);

fail_csum_root:
fail_block_groups:
btrfs_free_block_groups(fs_info);
free_extent_buffer(csum_root->node);
free_extent_buffer(csum_root->commit_root);
fail_dev_root:
Expand Down
5 changes: 4 additions & 1 deletion trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -4170,6 +4170,10 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans,
ins->offset = 0;

space_info = __find_space_info(root->fs_info, data);
if (!space_info) {
printk(KERN_ERR "No space info for %d\n", data);
return -ENOSPC;
}

if (orig_root->ref_cows || empty_size)
allowed_chunk_alloc = 1;
Expand Down Expand Up @@ -7372,7 +7376,6 @@ static int find_first_block_group(struct btrfs_root *root,
}
path->slots[0]++;
}
ret = -ENOENT;
out:
return ret;
}
Expand Down

0 comments on commit 43eea3d

Please sign in to comment.