diff options
| author | Dave Airlie <airlied@redhat.com> | 2018-09-27 11:06:46 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2018-09-27 11:06:46 +1000 |
| commit | bf78296ab1cb215d0609ac6cff4e43e941e51265 (patch) | |
| tree | a193615b327d9ee538e71ca5f13bbfb4f3db4e6b /include/linux/genhd.h | |
| parent | 18eb2f6e19d77900695987e3a2b775cccbe5b84e (diff) | |
| parent | 6bf4ca7fbc85d80446ac01c0d1d77db4d91a6d84 (diff) | |
| download | lwn-bf78296ab1cb215d0609ac6cff4e43e941e51265.tar.gz lwn-bf78296ab1cb215d0609ac6cff4e43e941e51265.zip | |
BackMerge v4.19-rc5 into drm-next
Sean Paul requested an -rc5 backmerge from some sun4i fixes.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/linux/genhd.h')
| -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]) + \ |
