mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
btrfs: make smaller extents more likely to go into bitmaps
It's less than ideal for small extents to eat into our extent budget, so force extents <= 32KB into the bitmaps save for the first handful. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Dennis Zhou <dennis@kernel.org> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
5d90c5c757
commit
f9bb615af2
1 changed files with 2 additions and 2 deletions
|
@ -2107,8 +2107,8 @@ static bool use_bitmap(struct btrfs_free_space_ctl *ctl,
|
||||||
* of cache left then go ahead an dadd them, no sense in adding
|
* of cache left then go ahead an dadd them, no sense in adding
|
||||||
* the overhead of a bitmap if we don't have to.
|
* the overhead of a bitmap if we don't have to.
|
||||||
*/
|
*/
|
||||||
if (info->bytes <= fs_info->sectorsize * 4) {
|
if (info->bytes <= fs_info->sectorsize * 8) {
|
||||||
if (ctl->free_extents * 2 <= ctl->extents_thresh)
|
if (ctl->free_extents * 3 <= ctl->extents_thresh)
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue