Skip to content

Commit

Permalink
Btrfs: advance window_start if we're using a bitmap
Browse files Browse the repository at this point in the history
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 <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Josef Bacik authored and Chris Mason committed Jan 26, 2012
1 parent 0c4e538 commit 9b23062
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/btrfs/free-space-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9b23062

Please sign in to comment.