diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-04-21 08:28:10 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:02 -0400 |
commit | ad5bd91ecee2b687071da00094564fd075f934ee (patch) | |
tree | ee32765fdc22ce58f973a4fac62fab54272df6e3 /fs/btrfs/volumes.c | |
parent | 4575c9cceeca2f51c50536850e15e1dc5187f3d9 (diff) |
Btrfs: Add 1MB to the min_free in alloc_chunk
This properly reflects the first 1MB we skip at the start of the device
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index fe5b00986d22..4fc92cf813d8 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -746,6 +746,9 @@ again: | |||
746 | else | 746 | else |
747 | min_free = calc_size; | 747 | min_free = calc_size; |
748 | 748 | ||
749 | /* we add 1MB because we never use the first 1MB of the device */ | ||
750 | min_free += 1024 * 1024; | ||
751 | |||
749 | /* build a private list of devices we will allocate from */ | 752 | /* build a private list of devices we will allocate from */ |
750 | while(index < num_stripes) { | 753 | while(index < num_stripes) { |
751 | device = list_entry(cur, struct btrfs_device, dev_list); | 754 | device = list_entry(cur, struct btrfs_device, dev_list); |