bcachefs: Don't call into journal reclaim when we're not supposed to
This was causing a deadlock when btree_update_nodes_writtes() invokes journal reclaim because of the btree cache being too dirty. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
59a7405161
commit
bcdb4b9732
@ -284,7 +284,8 @@ btree_key_can_insert_cached(struct btree_trans *trans,
|
||||
BUG_ON(iter->level);
|
||||
|
||||
if (!test_bit(BKEY_CACHED_DIRTY, &ck->flags) &&
|
||||
bch2_btree_key_cache_must_wait(trans->c))
|
||||
bch2_btree_key_cache_must_wait(trans->c) &&
|
||||
!(trans->flags & BTREE_INSERT_JOURNAL_RECLAIM))
|
||||
return BTREE_INSERT_NEED_JOURNAL_RECLAIM;
|
||||
|
||||
if (u64s <= ck->u64s)
|
||||
|
Loading…
x
Reference in New Issue
Block a user