From: Chris Mason Date: Mon, 21 Apr 2008 12:28:10 +0000 (-0400) Subject: Btrfs: Add 1MB to the min_free in alloc_chunk X-Git-Tag: v2.6.29-rc1~27^2~9^2~55^2~56^2~30^2~214 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad5bd91ecee2b687071da00094564fd075f934ee;p=thirdparty%2Fkernel%2Flinux.git 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 --- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index fe5b00986d221..4fc92cf813d8e 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -746,6 +746,9 @@ again: 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);