diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-03-31 22:10:21 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:08:58 +0200 |
commit | 2fa81d0b5bfdcd9c90725474ab9443f13152dfd8 (patch) | |
tree | e90ed92990c128b4b109c481702ae3b7c71bf875 | |
parent | bcachefs: Drop trans->nounlock (diff) | |
download | linux-2fa81d0b5bfdcd9c90725474ab9443f13152dfd8.tar.xz linux-2fa81d0b5bfdcd9c90725474ab9443f13152dfd8.zip |
bcachefs: Fix BTREE_FOREGROUND_MERGE_HYSTERESIS
We were multiplying instead of dividing - oops.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/btree_cache.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_cache.h b/fs/bcachefs/btree_cache.h index aa8fe4a1b04b..4791c3b64452 100644 --- a/fs/bcachefs/btree_cache.h +++ b/fs/bcachefs/btree_cache.h @@ -89,7 +89,7 @@ static inline unsigned btree_blocks(struct bch_fs *c) #define BTREE_FOREGROUND_MERGE_THRESHOLD(c) (btree_max_u64s(c) * 1 / 3) #define BTREE_FOREGROUND_MERGE_HYSTERESIS(c) \ (BTREE_FOREGROUND_MERGE_THRESHOLD(c) + \ - (BTREE_FOREGROUND_MERGE_THRESHOLD(c) << 2)) + (BTREE_FOREGROUND_MERGE_THRESHOLD(c) >> 2)) #define btree_node_root(_c, _b) ((_c)->btree_roots[(_b)->c.btree_id].b) |