summaryrefslogtreecommitdiff
path: root/libbcachefs/clock.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-12-28 18:19:05 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2019-12-28 18:20:16 -0500
commit82c7e8ff35ac0c501290cd4779e8ab2c553aa09d (patch)
tree821332b992d3946069e7dd4495a853a88c415e75 /libbcachefs/clock.h
parent956a05a126cebb085178cea318543369926362b2 (diff)
Update bcachefs sources to cfb41d25c7 bcachefs: Add an assertion to track down a heisenbug
Diffstat (limited to 'libbcachefs/clock.h')
-rw-r--r--libbcachefs/clock.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libbcachefs/clock.h b/libbcachefs/clock.h
index bfbbca8a..da50afe2 100644
--- a/libbcachefs/clock.h
+++ b/libbcachefs/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 *);