bcachefs: More general fix for transaction paths overflow
for_each_btree_key() now calls bch2_trans_begin() as needed; that means, we can also call it when we're in danger of overflowing transaction paths. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
396a887d8f
commit
d121172561
@ -329,8 +329,9 @@ __bch2_btree_iter_peek_and_restart(struct btree_trans *trans,
|
|||||||
{
|
{
|
||||||
struct bkey_s_c k;
|
struct bkey_s_c k;
|
||||||
|
|
||||||
while (k = __bch2_btree_iter_peek(iter, flags),
|
while ((hweight64(trans->paths_allocated) > BTREE_ITER_MAX / 2) ||
|
||||||
bkey_err(k) == -EINTR)
|
(k = __bch2_btree_iter_peek(iter, flags),
|
||||||
|
bkey_err(k) == -EINTR))
|
||||||
bch2_trans_begin(trans);
|
bch2_trans_begin(trans);
|
||||||
|
|
||||||
return k;
|
return k;
|
||||||
|
Loading…
Reference in New Issue
Block a user