summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/io_read.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-03-10 13:33:41 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-05-21 20:13:17 -0400
commit6659ba3b18f71282c7c54f3bffcfecfac73f202f (patch)
treea2b92785b4af6f897a7a6829aa8cff7142806328 /fs/bcachefs/io_read.h
parentbcachefs: bch2_subvolume_wait_for_pagecache_and_delete() cleanup (diff)
downloadlinux-6659ba3b18f71282c7c54f3bffcfecfac73f202f.tar.gz
linux-6659ba3b18f71282c7c54f3bffcfecfac73f202f.zip
bcachefs: Be precise about bch_io_failures
If the extent we're reading from changes, due to be being overwritten or moved (possibly partially) - we need to reset bch_io_failures so that we don't accidentally mark a new extent as poisoned prematurely. This means we have to separately track (in the retry path) the extent we previously read from. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io_read.h')
-rw-r--r--fs/bcachefs/io_read.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/bcachefs/io_read.h b/fs/bcachefs/io_read.h
index c78025d863e0..1a85b092fd1d 100644
--- a/fs/bcachefs/io_read.h
+++ b/fs/bcachefs/io_read.h
@@ -144,7 +144,8 @@ static inline void bch2_read_extent(struct btree_trans *trans,
}
int __bch2_read(struct btree_trans *, struct bch_read_bio *, struct bvec_iter,
- subvol_inum, struct bch_io_failures *, unsigned flags);
+ subvol_inum,
+ struct bch_io_failures *, struct bkey_buf *, unsigned flags);
static inline void bch2_read(struct bch_fs *c, struct bch_read_bio *rbio,
subvol_inum inum)
@@ -154,7 +155,7 @@ static inline void bch2_read(struct bch_fs *c, struct bch_read_bio *rbio,
rbio->subvol = inum.subvol;
bch2_trans_run(c,
- __bch2_read(trans, rbio, rbio->bio.bi_iter, inum, NULL,
+ __bch2_read(trans, rbio, rbio->bio.bi_iter, inum, NULL, NULL,
BCH_READ_retry_if_stale|
BCH_READ_may_promote|
BCH_READ_user_mapped));