函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:tg_prfill_limit

函数原型:static u64 tg_prfill_limit(struct seq_file *sf, struct blkg_policy_data *pd, int off)

返回类型:u64

参数:

类型参数名称
struct seq_file *sf
struct blkg_policy_data *pd
intoff
1562  tg等于pd_to_tg(pd)
1563  dname等于blkg_dev_name(he blkg and policy id this per-policy data belongs to )
1564  char bufs[4][21] = {"max", "max", "max", "max"}
1567  idle_time[26]等于""
1568  latency_time[26]等于""
1570  如果非dname则返回:0
1573  如果off恒等于LIMIT_LOW
1574  bps_dft等于0
1575  iops_dft等于0
1576  否则
1577  bps_dft等于U64_MAX
1578  iops_dft等于UINT_MAX
1581  如果 user configured bps limits [generic data direction definitions ][off]恒等于bps_dft user configured bps limits [WRITE][off]恒等于bps_dft user configured IOPS limits [generic data direction definitions ][off]恒等于iops_dft user configured IOPS limits [WRITE][off]恒等于iops_dftoff不等于LIMIT_LOW us 恒等于DFL_IDLE_THRESHOLD us 恒等于DFL_LATENCY_TARGET的值则返回:0
1590  如果 user configured bps limits [generic data direction definitions ][off]不等于U64_MAXsnprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1593  如果 user configured bps limits [WRITE][off]不等于U64_MAXsnprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1596  如果 user configured IOPS limits [generic data direction definitions ][off]不等于UINT_MAXsnprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1599  如果 user configured IOPS limits [WRITE][off]不等于UINT_MAXsnprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1602  如果off恒等于LIMIT_LOW
1603  如果 us 恒等于ULONG_MAXstrcpy(idle_time, " idle=max")
1605  否则snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1609  如果 us 恒等于ULONG_MAXstrcpy(latency_time, " latency=max")
1611  否则snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1616  seq_printf(sf, "%s rbps=%s wbps=%s riops=%s wiops=%s%s%s\n", dname, bufs[0], bufs[1], bufs[2], bufs[3], idle_time, latency_time)
1619  返回:0