函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ioc_weight_write

函数原型:static ssize_t ioc_weight_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)

返回类型:ssize_t

参数:

类型参数名称
struct kernfs_open_file *of
char *buf
size_tnbytes
loff_toff
2073  blkcg等于css_to_blkcg(of_css(of))
2074  iocc等于blkcg_to_iocc(blkcg)
2080  如果非strchr(buf, ':')则
2083  如果非sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments且非sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments则返回:负EINVAL
2086  如果v小于All weight knobs on the default hierarhcy should use the following min,* default and max values. The default value is the logarithmic center of* MIN and MAX and allows 100x to be expressed in both directions.v大于CGROUP_WEIGHT_MAX则返回:负EINVAL
2089  加自旋锁
2090  dfl_weight等于v
2092  iocg等于blkg_to_iocg(blkg)
2094  如果iocg
2095  spin_lock_irq( & lock)
2097  spin_unlock_irq( & lock)
2100  自旋锁解锁
2102  返回:nbytes
2105  ret等于lkg_conf_prep - parse and prepare for per-blkg config update*@blkcg: target block cgroup*@pol: target policy*@input: input string*@ctx: blkg_conf_ctx to be filled* Parse per-blkg config update from @input and initialize @ctx with the* result
2106  如果ret则返回:ret
2109  iocg等于blkg_to_iocg(blkg)
2111  如果非字符串指定长度比较
2112  v等于0
2113  否则
2114  如果非sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments则转到:einval
2116  如果v小于All weight knobs on the default hierarhcy should use the following min,* default and max values. The default value is the logarithmic center of* MIN and MAX and allows 100x to be expressed in both directions.v大于CGROUP_WEIGHT_MAX则转到:einval
2120  加自旋锁
2121  * A iocg can get its weight from two sources - an explicit * per-device-cgroup configuration or the default weight of the * cgroup. `cfg_weight` is the explicit per-device-cgroup * configuration. `weight` is the effective considering both * sources. * When等于v
2122  weight_updated(iocg)
2123  自旋锁解锁
2125  lkg_conf_finish - finish up per-blkg config update*@ctx: blkg_conf_ctx intiailized by blkg_conf_prep()* Finish up after per-blkg config update. This function must be paired* with blkg_conf_prep().
2126  返回:nbytes
2128  einval :
2129  lkg_conf_finish - finish up per-blkg config update*@ctx: blkg_conf_ctx intiailized by blkg_conf_prep()* Finish up after per-blkg config update. This function must be paired* with blkg_conf_prep().
2130  返回:负EINVAL