函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ioc_qos_write

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

返回类型:ssize_t

参数:

类型参数名称
struct kernfs_open_file *of
char *input
size_tnbytes
loff_toff
2192  disk等于lkg_conf_prep - parse and prepare for per-blkg config update*@inputp: input string pointer* Parse the device node prefix part, MAJ:MIN, of per-blkg config update* from @input and get and return the matching gendisk. *@inputp is
2193  如果是错误则返回:错误
2196  ioc等于q_to_ioc(queue)
2197  如果非ioc
2198  ret等于blk_iocost_init(queue)
2199  如果ret则转到:err
2201  ioc等于q_to_ioc(queue)
2204  spin_lock_irq( & lock)
2205  memcpy(qos, qos, qos的长度)
2206  enable等于enabled
2207  user等于user_qos_params
2208  spin_unlock_irq( & lock)
2210 p等于分割字符串循环
2216  如果非p则继续下一循环
2222  enable等于v
2223  继续下一循环
2226  如果非字符串比较user = false
2228  否则如果非字符串比较user = true
2230  否则转到:einval
2232  继续下一循环
2235  tok等于match_token(p, qos_tokens, args)
2237  :tok恒等于QOS_RPPM
2238  :tok恒等于QOS_WPPM
2244  如果v小于0或v大于10000则转到:einval
2246  qos[tok]等于v乘100
2247  退出
2248  :tok恒等于QOS_RLAT
2249  :tok恒等于QOS_WLAT
2252  qos[tok]等于v
2253  退出
2254  :tok恒等于QOS_MIN
2255  :tok恒等于QOS_MAX
2261  如果v小于0则转到:einval
2265  退出
2266  默认
2267  转到:einval
2269  user = true
2272  如果qos[QOS_MIN]大于qos[QOS_MAX]则转到:einval
2275  spin_lock_irq( & lock)
2277  如果enable
2278  lk_queue_flag_set - atomically set a queue flag*@flag: flag to be set*@q: request queue
2279  enabled = true
2280  否则
2281  lk_queue_flag_clear - atomically clear a queue flag*@flag: flag to be cleared*@q: request queue
2282  enabled = false
2285  如果user
2286  memcpy(qos, qos, qos的长度)
2287  user_qos_params = true
2288  否则
2289  user_qos_params = false
2292  ioc_refresh_params(ioc, true)
2293  spin_unlock_irq( & lock)
2295  This is a counterpart of get_disk_and_module() and thus also of* get_gendisk().
2296  返回:nbytes
2297  einval :
2298  ret等于负EINVAL
2299  err :
2300  This is a counterpart of get_disk_and_module() and thus also of* get_gendisk().
2301  返回:ret