diff options
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 { | |||
| 83 | } __attribute__((packed)); | 83 | } __attribute__((packed)); |
| 84 | 84 | ||
| 85 | struct disk_stats { | 85 | struct disk_stats { |
| 86 | u64 nsecs[NR_STAT_GROUPS]; | ||
| 86 | unsigned long sectors[NR_STAT_GROUPS]; | 87 | unsigned long sectors[NR_STAT_GROUPS]; |
| 87 | unsigned long ios[NR_STAT_GROUPS]; | 88 | unsigned long ios[NR_STAT_GROUPS]; |
| 88 | unsigned long merges[NR_STAT_GROUPS]; | 89 | unsigned long merges[NR_STAT_GROUPS]; |
| 89 | unsigned long ticks[NR_STAT_GROUPS]; | ||
| 90 | unsigned long io_ticks; | 90 | unsigned long io_ticks; |
| 91 | unsigned long time_in_queue; | 91 | unsigned long time_in_queue; |
| 92 | }; | 92 | }; |
| @@ -354,6 +354,9 @@ static inline void free_part_stats(struct hd_struct *part) | |||
| 354 | 354 | ||
| 355 | #endif /* CONFIG_SMP */ | 355 | #endif /* CONFIG_SMP */ |
| 356 | 356 | ||
| 357 | #define part_stat_read_msecs(part, which) \ | ||
| 358 | div_u64(part_stat_read(part, nsecs[which]), NSEC_PER_MSEC) | ||
| 359 | |||
| 357 | #define part_stat_read_accum(part, field) \ | 360 | #define part_stat_read_accum(part, field) \ |
| 358 | (part_stat_read(part, field[STAT_READ]) + \ | 361 | (part_stat_read(part, field[STAT_READ]) + \ |
| 359 | part_stat_read(part, field[STAT_WRITE]) + \ | 362 | part_stat_read(part, field[STAT_WRITE]) + \ |
