Commit dccedaaa authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Fix btree node prefetchig

We were forgetting to count down the number of nodes to prefetch, firing
off _way_ more than intended - whoops.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 0196eb89
......@@ -764,7 +764,7 @@ static int btree_path_prefetch(struct btree_trans *trans, struct btree_path *pat
bch2_bkey_buf_init(&tmp);
while (nr && !ret) {
while (nr-- && !ret) {
if (!bch2_btree_node_relock(trans, path, path->level))
break;
......@@ -799,7 +799,7 @@ static int btree_path_prefetch_j(struct btree_trans *trans, struct btree_path *p
bch2_bkey_buf_init(&tmp);
while (nr && !ret) {
while (nr-- && !ret) {
if (!bch2_btree_node_relock(trans, path, path->level))
break;
......
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