summaryrefslogtreecommitdiff
path: root/fs/bcachefs/fs-io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-11-24 03:00:23 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:17 +0300
commit084d42bbd67c5b2de607f56a94c7295459b16b61 (patch)
tree91651bd4fbd44623acbe09bfca6d4e9a649cfc9f /fs/bcachefs/fs-io.c
parent9ca4853b98af5fa15a2ddc47a45f8e103027f95d (diff)
downloadlinux-084d42bbd67c5b2de607f56a94c7295459b16b61.tar.xz
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/fs-io.c')
-rw-r--r--fs/bcachefs/fs-io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c
index c014f10885dc..b36685ebba69 100644
--- a/fs/bcachefs/fs-io.c
+++ b/fs/bcachefs/fs-io.c
@@ -881,6 +881,10 @@ retry:
swap(rbio->bio.bi_iter.bi_size, bytes);
bio_advance(&rbio->bio, bytes);
+
+ ret = btree_trans_too_many_iters(trans);
+ if (ret)
+ break;
}
err:
bch2_trans_iter_exit(trans, &iter);