diff options
author | Dennis Zhou <dennis@kernel.org> | 2020-01-03 00:26:44 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-01-20 18:41:00 +0300 |
commit | f9bb615af2ba8724bff82376275a14b02eef5eb2 (patch) | |
tree | 195505808f45420164a430cf32c2bd418c56dd6d /fs/btrfs/free-space-cache.c | |
parent | 5d90c5c75711d9734e9d3d38a6e3b849b7bea742 (diff) | |
download | linux-f9bb615af2ba8724bff82376275a14b02eef5eb2.tar.xz |
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>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r-- | fs/btrfs/free-space-cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index f75eb737e713..30e010852040 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -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 * the overhead of a bitmap if we don't have to. */ - if (info->bytes <= fs_info->sectorsize * 4) { - if (ctl->free_extents * 2 <= ctl->extents_thresh) + if (info->bytes <= fs_info->sectorsize * 8) { + if (ctl->free_extents * 3 <= ctl->extents_thresh) return false; } else { return false; |