bcachefs: btree read retry fixes
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 3 Jul 2025 23:19:21 +0000 (19:19 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 5 Jul 2025 16:42:41 +0000 (12:42 -0400)
commit14dd95647ea533c7d7c528b9bb7e163e433b47b9
tree8ab3ef7ed63b9cbfe38bfefebb815fe089b69377
parenta77ffbe34d450dd685e55ba942b025ded2517aff
bcachefs: btree read retry fixes

Fix btree node read retries after validate errors:

__btree_err() is the wrong place to flag a topology error: that is done
by btree_lost_data().

Additionally, some calls to bch2_bkey_pick_read_device() were not
updated in the 6.16 rework for improved log messages; we were failing to
signal that we still had a retry.

Cc: Nikita Ofitserov <himikof@gmail.com>
Cc: Alan Huang <mmpgouride@gmail.com>
Reported-and-tested-by: Edoardo Codeglia <bcachefs@404.blue>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_io.c
fs/bcachefs/errcode.h
fs/bcachefs/error.c