bcachefs: don't queue btree nodes for rewrites during scan

many nodes found during scan will be old nodes, overwritten by newer
nodes

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2024-04-12 00:09:08 -04:00
parent 7b4c4ccf84
commit ba8ed36e72

View File

@ -1340,7 +1340,9 @@ start:
rb->start_time);
bio_put(&rb->bio);
if (saw_error && !btree_node_read_error(b)) {
if (saw_error &&
!btree_node_read_error(b) &&
c->curr_recovery_pass != BCH_RECOVERY_PASS_scan_for_btree_nodes) {
printbuf_reset(&buf);
bch2_bpos_to_text(&buf, b->key.k.p);
bch_err_ratelimited(c, "%s: rewriting btree node at btree=%s level=%u %s due to error",