summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/alloc_background.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-10-17 16:44:27 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:44 -0400
commit289980195ffaa949ecd4216337a70a8e23cf8e86 (patch)
tree263efa6b2b8ffc6205ba7b4a4984e5395ff47b32 /fs/bcachefs/alloc_background.c
parent8d6b6222bf168e7a0613c0baf3da30f2c7338488 (diff)
downloadlinux-289980195ffaa949ecd4216337a70a8e23cf8e86.tar.gz
linux-289980195ffaa949ecd4216337a70a8e23cf8e86.tar.bz2
linux-289980195ffaa949ecd4216337a70a8e23cf8e86.zip
bcachefs: Start/stop io clock hands in read/write paths
This fixes a bug where the clock hands in the journal and superblock didn't match, because we were still incrementing the read clock hand while read-only. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r--fs/bcachefs/alloc_background.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
index 459da00457ef..b0448d2f1916 100644
--- a/fs/bcachefs/alloc_background.c
+++ b/fs/bcachefs/alloc_background.c
@@ -1267,18 +1267,6 @@ void bch2_recalc_capacity(struct bch_fs *c)
c->bucket_size_max = bucket_size_max;
- if (c->capacity) {
- bch2_io_timer_add(&c->io_clock[READ],
- &c->bucket_clock[READ].rescale);
- bch2_io_timer_add(&c->io_clock[WRITE],
- &c->bucket_clock[WRITE].rescale);
- } else {
- bch2_io_timer_del(&c->io_clock[READ],
- &c->bucket_clock[READ].rescale);
- bch2_io_timer_del(&c->io_clock[WRITE],
- &c->bucket_clock[WRITE].rescale);
- }
-
/* Wake up case someone was waiting for buckets */
closure_wake_up(&c->freelist_wait);
}