bcachefs: Tweak btree cache helpers for use by btree node scan
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 3 Jul 2025 22:50:18 +0000 (18:50 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 5 Jul 2025 03:17:07 +0000 (23:17 -0400)
commitc2b2c7d1da8f26c6db40de2bed142d66e238bd8a
tree6d110b076dd4146057f899e48ab24d1e4c5bbc9d
parentc72d628469b8f46251b3afc361269cb15de0c988
bcachefs: Tweak btree cache helpers for use by btree node scan

btree node scan needs to not use the btree node cache: that causes
interference from prior failed reads and parallel workers.

Instead we need to allocate btree nodes that don't live in the btree
cache, so that we can call bch2_btree_node_read_done() directly.

This patch tweaks the low level helpers so they don't touch the btree
cache lists.

Cc: Nikita Ofitserov <himikof@gmail.com>
Reviewed-by: Nikita Ofitserov <himikof@gmail.com>
Reported-and-tested-by: Edoardo Codeglia <bcachefs@404.blue>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_cache.c
fs/bcachefs/btree_cache.h
fs/bcachefs/debug.c