diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-16 23:30:02 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:04 -0400 |
commit | 45a1ab57ddb53a8b392baab2142c909154a8d37c (patch) | |
tree | 92a9ec5d23adc02a59c324e209ac0980e0b75347 /fs | |
parent | 91ecd41b7f02b95279dddcb2193af454efd39497 (diff) | |
download | lwn-45a1ab57ddb53a8b392baab2142c909154a8d37c.tar.gz lwn-45a1ab57ddb53a8b392baab2142c909154a8d37c.zip |
bcachefs: Fix bch2_btree_update_start()
The calculation for number of nodes to allocate in
bch2_btree_update_start() was incorrect - this fixes a BUG_ON() on the
small nodes test.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/btree_update_interior.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c index d2811c4756b7..e95e48857bb8 100644 --- a/fs/bcachefs/btree_update_interior.c +++ b/fs/bcachefs/btree_update_interior.c @@ -1077,7 +1077,7 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path, BKEY_BTREE_PTR_U64s_MAX * (1 + split))) break; - split = true; + split = path->l[update_level].b->nr.live_u64s > BTREE_SPLIT_THRESHOLD(c); } if (flags & BTREE_INSERT_GC_LOCK_HELD) |