aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Zhou <[email protected]>2020-01-02 16:26:44 -0500
committerDavid Sterba <[email protected]>2020-01-20 16:41:00 +0100
commitf9bb615af2ba8724bff82376275a14b02eef5eb2 (patch)
tree195505808f45420164a430cf32c2bd418c56dd6d
parent5d90c5c75711d9734e9d3d38a6e3b849b7bea742 (diff)
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 <[email protected]> Signed-off-by: Dennis Zhou <[email protected]> Signed-off-by: David Sterba <[email protected]>
-rw-r--r--fs/btrfs/free-space-cache.c4
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;