函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-cgroup-rwstat.c Create Date:2022-07-27 19:16:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__blkg_prfill_rwstat - prfill helper for a blkg_rwstat*@sf: seq_file to print to*@pd: policy private data of interest*@rwstat: rwstat to print* Print @rwstat to @sf for the device assocaited with @pd.

函数原型:u64 __blkg_prfill_rwstat(struct seq_file *sf, struct blkg_policy_data *pd, const struct blkg_rwstat_sample *rwstat)

返回类型:u64

参数:

类型参数名称
struct seq_file *sf
struct blkg_policy_data *pd
const struct blkg_rwstat_sample *rwstat
45  static const char * rwstr[] = {[BLKG_RWSTAT_READ] = "Read", [BLKG_RWSTAT_WRITE] = "Write", [BLKG_RWSTAT_SYNC] = "Sync", [BLKG_RWSTAT_ASYNC] = "Async", [BLKG_RWSTAT_DISCARD] = "Discard", }
52  dname等于blkg_dev_name(he blkg and policy id this per-policy data belongs to )
56  如果非dname则返回:0
59 i小于BLKG_RWSTAT_NR循环seq_printf(sf, "%s %s %llu\n", dname, rwstr[i], cnt[i])
63  v等于cnt[BLKG_RWSTAT_READ]加cnt[BLKG_RWSTAT_WRITE]加cnt[BLKG_RWSTAT_DISCARD]
66  seq_printf(sf, "%s Total %llu\n", dname, v)
67  返回:v
调用者
名称描述
blkg_prfill_rwstatlkg_prfill_rwstat - prfill callback for blkg_rwstat*@sf: seq_file to print to*@pd: policy private data of interest*@off: offset to the blkg_rwstat in @pd* prfill callback for printing a blkg_rwstat.
tg_prfill_rwstat_recursive