Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\genhd.c Create Date:2022-07-28 17:19:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:aggregate disk stat collector. Uses the same stats that the sysfs* entries do, above, but makes them available through one seq_file.* The output looks suspiciously like /proc/partitions with a bunch of* extra fields.

Proto:static int diskstats_show(struct seq_file *seqf, void *v)

Type:int

Parameter:

TypeParameterName
struct seq_file *seqf
void *v
1367  gp = v
1381  disk_part_iter_init - initialize partition iterator*@piter: iterator to initialize*@disk: disk to iterate over*@flags: DISK_PITER_* flags* Initialize @piter so that it iterates over partitions of @disk.* CONTEXT:* Don't care.
1382  When hd = disk_part_iter_next - proceed iterator to the next partition and return it*@piter: iterator of interest* Proceed @piter to the next partition and return it.* CONTEXT:* Don't care. cycle
1383  inflight = part_in_flight(queue, hd)
1384  seq_printf(seqf, "%4d %7d %s %lu %lu %lu %u %lu %lu %lu %u %u %u %u %lu %lu %lu %u %lu %u\n", MAJOR(part_devt(hd)), MINOR(part_devt(hd)), disk_name(gp, partno, buf), part_stat_read(hd, ios[STAT_READ]), part_stat_read(hd, merges[STAT_READ]), part_stat_read(hd, sectors[STAT_READ]), (unsignedint)part_stat_read_msecs(hd, STAT_READ), part_stat_read(hd, ios[STAT_WRITE]), part_stat_read(hd, merges[STAT_WRITE]), part_stat_read(hd, sectors[STAT_WRITE]), (unsignedint)part_stat_read_msecs(hd, STAT_WRITE), inflight, Convert jiffies to milliseconds and back.* Avoid unnecessary multiplications/divisions in the* two most common HZ cases:, Convert jiffies to milliseconds and back.* Avoid unnecessary multiplications/divisions in the* two most common HZ cases:, part_stat_read(hd, ios[STAT_DISCARD]), part_stat_read(hd, merges[STAT_DISCARD]), part_stat_read(hd, sectors[STAT_DISCARD]), (unsignedint)part_stat_read_msecs(hd, STAT_DISCARD), part_stat_read(hd, ios[STAT_FLUSH]), (unsignedint)part_stat_read_msecs(hd, STAT_FLUSH))
1412  disk_part_iter_exit - finish up partition iteration*@piter: iter of interest* Called when iteration is over. Cleans up @piter.* CONTEXT:* Don't care.
1414  Return 0