1 #ifndef _BCACHEFS_CLOCK_H
2 #define _BCACHEFS_CLOCK_H
4 void bch2_io_timer_add(struct io_clock *, struct io_timer *);
5 void bch2_io_timer_del(struct io_clock *, struct io_timer *);
6 void bch2_kthread_io_clock_wait(struct io_clock *, unsigned long);
7 void bch2_increment_clock(struct bch_fs *, unsigned, int);
9 void bch2_io_clock_schedule_timeout(struct io_clock *, unsigned long);
11 #define bch2_kthread_wait_event_ioclock_timeout(condition, clock, timeout)\
13 long __ret = timeout; \
15 if (!___wait_cond_timeout(condition)) \
16 __ret = __wait_event_timeout(wq, condition, timeout); \
20 void bch2_io_clock_exit(struct io_clock *);
21 int bch2_io_clock_init(struct io_clock *);
23 #endif /* _BCACHEFS_CLOCK_H */