From: Josef Bacik Date: Thu, 26 Jan 2012 20:01:12 +0000 (-0500) Subject: Btrfs: advance window_start if we're using a bitmap X-Git-Tag: v3.3-rc2~16^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b23062840e7c685ef0a0b561285d6e3a3b6811b;p=profile%2Fcommon%2Fkernel-common.git Btrfs: advance window_start if we're using a bitmap If we span a long area in a bitmap we could end up taking a lot of time searching to the next free area if we're searching from the original window_start, so advance window_start in order to make sure we don't do any superficial searching. Thanks, Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 61447a5..5802b147 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -2251,6 +2251,7 @@ u64 btrfs_alloc_from_cluster(struct btrfs_block_group_cache *block_group, offset_index); continue; } + cluster->window_start += bytes; } else { ret = entry->offset;