diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-12 06:09:08 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-14 04:48:17 +0200 |
commit | ba8ed36e72033dd6b89d44145f323e6c4508bfc9 (patch) | |
tree | f3b21d8f594ad6671b537a79623a09f8ae1144ca /fs/bcachefs/btree_io.c | |
parent | bcachefs: fix race in bch2_btree_node_evict() (diff) | |
download | linux-ba8ed36e72033dd6b89d44145f323e6c4508bfc9.tar.xz linux-ba8ed36e72033dd6b89d44145f323e6c4508bfc9.zip |
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>
Diffstat (limited to 'fs/bcachefs/btree_io.c')
-rw-r--r-- | fs/bcachefs/btree_io.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c index b1aaf0550644..9678b2375bed 100644 --- a/fs/bcachefs/btree_io.c +++ b/fs/bcachefs/btree_io.c @@ -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", |