函数逻辑报告 |
Source Code:block\blk-throttle.c |
Create Date:2022-07-27 19:19:27 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:tg_set_limit
函数原型:static ssize_t tg_set_limit(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)
返回类型:ssize_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct kernfs_open_file * | of | |
char * | buf | |
size_t | nbytes | |
loff_t | off |
1632 | blkcg等于css_to_blkcg(of_css(of)) |
1645 | tg等于blkg_to_tg(blkg) |
1647 | v[0]等于 user configured bps limits [generic data direction definitions ][index] |
1648 | v[1]等于 user configured bps limits [WRITE][index] |
1649 | v[2]等于 user configured IOPS limits [generic data direction definitions ][index] |
1650 | v[3]等于 user configured IOPS limits [WRITE][index] |
1653 | latency_time等于 us |
1654 | 当(true)循环 |
1660 | 如果sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments不等于1则退出 |
1668 | 分割字符串 |
1669 | 如果非p或sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments不等于1且字符串比较则转到:out_finish |
1673 | 如果非val则转到:out_finish |
1681 | 否则如果非字符串比较则v[2]等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, val, UINT_MAX) |
1683 | 否则如果非字符串比较则v[3]等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, val, UINT_MAX) |
1687 | 否则如果off恒等于LIMIT_LOW且非字符串比较则latency_time等于val |
1689 | 否则转到:out_finish |
1694 | user configured bps limits [WRITE][index]等于v[1] |
1696 | user configured IOPS limits [WRITE][index]等于v[3] |
1699 | internally used bytes per second rate limits [generic data direction definitions ][index]等于v[0] |
1700 | internally used bytes per second rate limits [WRITE][index]等于v[1] |
1702 | internally used IOPS limits [WRITE][index]等于v[3] |
1706 | internally used bytes per second rate limits [WRITE][LIMIT_LOW]等于两数取小( user configured bps limits [WRITE][LIMIT_LOW], user configured bps limits [WRITE][LIMIT_MAX]) |
1710 | internally used IOPS limits [WRITE][LIMIT_LOW]等于两数取小( user configured IOPS limits [WRITE][LIMIT_LOW], user configured IOPS limits [WRITE][LIMIT_MAX]) |
1713 | us 等于latency_time |
1720 | internally used bytes per second rate limits [generic data direction definitions ][LIMIT_LOW]等于0 |
1723 | internally used IOPS limits [WRITE][LIMIT_LOW]等于0 |
1724 | us 等于DFL_IDLE_THRESHOLD |
1725 | us 等于DFL_LATENCY_TARGET |
1732 | 如果limit_valid[LIMIT_LOW]则 |
1733 | 如果index恒等于LIMIT_LOW则limit_index等于LIMIT_LOW |
1735 | 否则limit_index等于LIMIT_MAX |
1737 | tg_conf_updated(tg, index == LIMIT_LOW && limit_valid[LIMIT_LOW]) |
1739 | ret等于0 |
1740 | out_finish : |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |