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
This commit is contained in:
@@ -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]) + \
|
||||
|
Reference in New Issue
Block a user