diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-12 02:32:11 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-04-17 15:44:17 -0400 |
commit | 33fc9b12e9e95b91f119a936f80e9964a525a8c2 (patch) | |
tree | d47c5fb360f56485704323a2e45d016009d99294 | |
parent | 319b27627aa98f8e3b0e87b28b52bfe04c415254 (diff) |
bcachefs: Always check for bucket reuse after read
Since dirty extents can be moved or overwritten, it's not just cached
data that we need the ptr_stale() check in bc2h_read_endio for - this
fixes data checksum errors seen in the tiering ktest tests.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r-- | fs/bcachefs/io.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c index 50b90b728a6d..cab65e44efa9 100644 --- a/fs/bcachefs/io.c +++ b/fs/bcachefs/io.c @@ -1893,9 +1893,8 @@ static void bch2_read_endio(struct bio *bio) return; } - if (rbio->pick.ptr.cached && - (((rbio->flags & BCH_READ_RETRY_IF_STALE) && race_fault()) || - ptr_stale(ca, &rbio->pick.ptr))) { + if (((rbio->flags & BCH_READ_RETRY_IF_STALE) && race_fault()) || + ptr_stale(ca, &rbio->pick.ptr)) { atomic_long_inc(&c->read_realloc_races); if (rbio->flags & BCH_READ_RETRY_IF_STALE) |