diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-23 09:33:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-23 09:33:28 +0300 |
commit | a83f87c1d2a93a8fd2413ce8f410b69848db0fd5 (patch) | |
tree | 8e5fae2843a8b788929266b9cfbd0b389763854b /include | |
parent | 328c6333ba3df92d5ea7f2cee46379ed57882af6 (diff) | |
parent | b57e99b4b8b0ebdf9707424e7ddc0c392bdc5fe6 (diff) | |
download | linux-a83f87c1d2a93a8fd2413ce8f410b69848db0fd5.tar.xz |
Merge tag 'for-linus-20180922' of git://git.kernel.dk/linux-block
Jens writes:
"Just a single fix in this pull request, fixing a regression in
/proc/diskstats caused by the unification of timestamps."
* tag 'for-linus-20180922' of git://git.kernel.dk/linux-block:
block: use nanosecond resolution for iostat
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/genhd.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 57864422a2c8..25c08c6c7f99 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -83,10 +83,10 @@ struct partition { } __attribute__((packed)); struct disk_stats { + u64 nsecs[NR_STAT_GROUPS]; unsigned long sectors[NR_STAT_GROUPS]; unsigned long ios[NR_STAT_GROUPS]; unsigned long merges[NR_STAT_GROUPS]; - unsigned long ticks[NR_STAT_GROUPS]; unsigned long io_ticks; unsigned long time_in_queue; }; @@ -354,6 +354,9 @@ static inline void free_part_stats(struct hd_struct *part) #endif /* CONFIG_SMP */ +#define part_stat_read_msecs(part, which) \ + div_u64(part_stat_read(part, nsecs[which]), NSEC_PER_MSEC) + #define part_stat_read_accum(part, field) \ (part_stat_read(part, field[STAT_READ]) + \ part_stat_read(part, field[STAT_WRITE]) + \ |