Skip to content

Commit

Permalink
Btrfs: Add 1MB to the min_free in alloc_chunk
Browse files Browse the repository at this point in the history
This properly reflects the first 1MB we skip at the start of the device

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent 4575c9c commit ad5bd91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,9 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
else
min_free = calc_size;

/* we add 1MB because we never use the first 1MB of the device */
min_free += 1024 * 1024;

/* build a private list of devices we will allocate from */
while(index < num_stripes) {
device = list_entry(cur, struct btrfs_device, dev_list);
Expand Down

0 comments on commit ad5bd91

Please sign in to comment.