include/linux/part_stat.h essentially defines the struct disk_stats, a few macros that operate on such stats an the inline function part_stat_set_all. 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 io_ticks;
local_t in_flight[2];
};
NR_STAT_GROUPS is defined to 4 and corresponds to the four statistics groups defined in include/linux/blk_types.h (enum stat_group): STAT_READ
STAT_WRITE
STAT_DISCARD
STAT_FLUSH