diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-09-09 16:09:20 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-09-14 11:28:41 -0400 |
commit | 6ad0fa30a9c5aafda1206a64ba1262796ed35457 (patch) | |
tree | d779ccee13ee4e8fa7a7b21e799dd6126a48274d /libbcachefs/io_read.c | |
parent | 0c6b9627a40559939ae58d305089c17dea7df5df (diff) |
Update bcachefs sources to 1c8d3fc41e72 bcachefs: fast_list.c is only required for async obj debugging
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/io_read.c')
-rw-r--r-- | libbcachefs/io_read.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libbcachefs/io_read.c b/libbcachefs/io_read.c index e7ba0d0b..3765aa52 100644 --- a/libbcachefs/io_read.c +++ b/libbcachefs/io_read.c @@ -37,6 +37,12 @@ module_param_named(read_corrupt_ratio, bch2_read_corrupt_ratio, uint, 0644); MODULE_PARM_DESC(read_corrupt_ratio, ""); #endif +static bool bch2_poison_extents_on_checksum_error; +module_param_named(poison_extents_on_checksum_error, + bch2_poison_extents_on_checksum_error, bool, 0644); +MODULE_PARM_DESC(poison_extents_on_checksum_error, + "Extents with checksum errors are marked as poisoned - unsafe without read fua support"); + #ifndef CONFIG_BCACHEFS_NO_LATENCY_ACCT static inline u32 bch2_dev_congested_read(struct bch_dev *ca, u64 now) @@ -539,6 +545,9 @@ static void get_rbio_extent(struct btree_trans *trans, static noinline int maybe_poison_extent(struct btree_trans *trans, struct bch_read_bio *rbio, enum btree_id btree, struct bkey_s_c read_k) { + if (!bch2_poison_extents_on_checksum_error) + return 0; + struct bch_fs *c = trans->c; struct data_update *u = rbio_data_update(rbio); @@ -1274,10 +1283,6 @@ retry_pick: async_object_list_add(c, rbio, rbio, &rbio->list_idx); - /* XXX: also nvme read recovery level */ - if (unlikely(failed && bch2_dev_io_failures(failed, pick.ptr.dev))) - rbio->bio.bi_opf |= REQ_FUA; - if (rbio->bounce) trace_and_count(c, io_read_bounce, &rbio->bio); |