diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-12-19 15:07:51 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:33 -0400 |
commit | 5873efbfd9c3f53312aaa6c3024592a2a344f615 (patch) | |
tree | 3e7b0e642b152359825b76b9861109c4dcd73363 /fs/bcachefs/clock.h | |
parent | 187c71f6ab439582c80433ef9e04f615b8c0f576 (diff) |
bcachefs: Make io timers less buggy
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/clock.h')
-rw-r--r-- | fs/bcachefs/clock.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bcachefs/clock.h b/fs/bcachefs/clock.h index bfbbca8a207b..da50afe206cc 100644 --- a/fs/bcachefs/clock.h +++ b/fs/bcachefs/clock.h @@ -7,7 +7,7 @@ void bch2_io_timer_del(struct io_clock *, struct io_timer *); void bch2_kthread_io_clock_wait(struct io_clock *, unsigned long, unsigned long); -void __bch2_increment_clock(struct io_clock *); +void __bch2_increment_clock(struct io_clock *, unsigned); static inline void bch2_increment_clock(struct bch_fs *c, unsigned sectors, int rw) @@ -16,7 +16,7 @@ static inline void bch2_increment_clock(struct bch_fs *c, unsigned sectors, if (unlikely(this_cpu_add_return(*clock->pcpu_buf, sectors) >= IO_CLOCK_PCPU_SECTORS)) - __bch2_increment_clock(clock); + __bch2_increment_clock(clock, this_cpu_xchg(*clock->pcpu_buf, 0)); } void bch2_io_clock_schedule_timeout(struct io_clock *, unsigned long); @@ -30,6 +30,8 @@ void bch2_io_clock_schedule_timeout(struct io_clock *, unsigned long); __ret; \ }) +ssize_t bch2_io_timers_show(struct io_clock *, char *); + void bch2_io_clock_exit(struct io_clock *); int bch2_io_clock_init(struct io_clock *); |