bcachefs: btree_and_journal_iter: don't iterate over too many whiteouts when prefetching

To help ameloriate issues with peek operations having to skip over
deletions in the journal - just bail out if all we're doing is
prefetching btree nodes.

Since btree node prefetching runs every time we iterate to a new node,
and has to sequentially scan ahead, this avoids another O(n^2).

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2024-11-17 14:39:46 -05:00
commit 854724d116
3 changed files with 10 additions and 0 deletions