diff options
Diffstat (limited to 'fs/bcachefs/util.h')
-rw-r--r-- | fs/bcachefs/util.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index 97e4e6d00a37..7c7264f4f595 100644 --- a/fs/bcachefs/util.h +++ b/fs/bcachefs/util.h @@ -372,6 +372,9 @@ ssize_t bch2_scnprint_flag_list(char *, size_t, const char * const[], u64); u64 bch2_read_flag_list(char *, const char * const[]); #define NR_QUANTILES 15 +#define QUANTILE_IDX(i) inorder_to_eytzinger0(i, NR_QUANTILES) +#define QUANTILE_FIRST eytzinger0_first(NR_QUANTILES) +#define QUANTILE_LAST eytzinger0_last(NR_QUANTILES) struct quantiles { struct quantile_entry { @@ -401,7 +404,13 @@ struct time_stats { struct time_stat_buffer __percpu *buffer; }; -void bch2_time_stats_update(struct time_stats *stats, u64 time); +void __bch2_time_stats_update(struct time_stats *stats, u64, u64); + +static inline void bch2_time_stats_update(struct time_stats *stats, u64 start) +{ + __bch2_time_stats_update(stats, start, local_clock()); +} + size_t bch2_time_stats_print(struct time_stats *, char *, size_t); void bch2_time_stats_exit(struct time_stats *); |