Skip to content

Commit

Permalink
Btrfs: prealloc more blocks for the extent map
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason authored and David Woodhouse committed Apr 28, 2007
1 parent 7c4452b commit 308535a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ static int find_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root
if (num_blocks == 0) {
fill_prealloc = 1;
num_blocks = 1;
total_needed = min(level + 2, BTRFS_MAX_LEVEL) * 3;
total_needed = (min(level + 1, BTRFS_MAX_LEVEL) + 2) * 3;
}
find_search_start(root, 0);
if (info->block_group_cache &&
Expand Down

0 comments on commit 308535a

Please sign in to comment.