diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-04-28 15:17:08 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-04-28 15:17:08 -0400 |
commit | 308535a05e4c39d2be26e0aeee722682deeb6f77 (patch) | |
tree | 5781bb6b0c7b999c143ab79dacd3f923b2703751 /fs/btrfs/extent-tree.c | |
parent | 7c4452b9a6ca7aabe37ea2e43d443110bdc08cd8 (diff) | |
download | linux-stable-308535a05e4c39d2be26e0aeee722682deeb6f77.tar.gz linux-stable-308535a05e4c39d2be26e0aeee722682deeb6f77.tar.bz2 linux-stable-308535a05e4c39d2be26e0aeee722682deeb6f77.zip |
Btrfs: prealloc more blocks for the extent map
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 652cf305a967..62051a36664a 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -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 && |