Commit 45a1ab57 authored by Kent Overstreet's avatar Kent Overstreet

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: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 91ecd41b
...@@ -1077,7 +1077,7 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path, ...@@ -1077,7 +1077,7 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path,
BKEY_BTREE_PTR_U64s_MAX * (1 + split))) BKEY_BTREE_PTR_U64s_MAX * (1 + split)))
break; break;
split = true; split = path->l[update_level].b->nr.live_u64s > BTREE_SPLIT_THRESHOLD(c);
} }
if (flags & BTREE_INSERT_GC_LOCK_HELD) if (flags & BTREE_INSERT_GC_LOCK_HELD)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment