aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-11-23 19:00:23 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:17 -0400
commit084d42bbd67c5b2de607f56a94c7295459b16b61 (patch)
tree91651bd4fbd44623acbe09bfca6d4e9a649cfc9f /fs/bcachefs/io.c
parent9ca4853b98af5fa15a2ddc47a45f8e103027f95d (diff)
bcachefs: Apply workaround for too many btree iters to read path
Reading from cached data, which calls bch2_bucket_io_time_reset(), is leading to transaction iterator overflows - this standardizes the workaround. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/io.c')
-rw-r--r--fs/bcachefs/io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c
index c5bd17f913f2..03bea2ddfb39 100644
--- a/fs/bcachefs/io.c
+++ b/fs/bcachefs/io.c
@@ -2395,6 +2395,10 @@ retry:
swap(bvec_iter.bi_size, bytes);
bio_advance_iter(&rbio->bio, &bvec_iter, bytes);
+
+ ret = btree_trans_too_many_iters(&trans);
+ if (ret)
+ break;
}
err:
bch2_trans_iter_exit(&trans, &iter);