函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ioc_cost_model_write

函数原型:static ssize_t ioc_cost_model_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
2358  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
2359  如果是错误则返回:错误
2362  ioc等于q_to_ioc(queue)
2363  如果非ioc
2364  ret等于blk_iocost_init(queue)
2365  如果ret则转到:err
2367  ioc等于q_to_ioc(queue)
2370  spin_lock_irq( & lock)
2371  memcpy(u, i_lcoefs, u的长度)
2372  user等于user_cost_model
2373  spin_unlock_irq( & lock)
2375 p等于分割字符串循环
2381  如果非p则继续下一循环
2387  如果非字符串比较user = false
2389  否则如果非字符串比较user = true
2391  否则转到:einval
2393  继续下一循环
2396  如果字符串比较则转到:einval
2398  继续下一循环
2401  tok等于match_token(p, i_lcoef_tokens, args)
2402  如果tok恒等于NR_I_LCOEFS则转到:einval
2404  如果match_u64: - scan a decimal representation of a u64 from* a substring_t*@s: substring_t to be scanned*@result: resulting unsigned long long on success* Description: Attempts to parse the &substring_t @s as a long decimal* integer则转到:einval
2406  u[tok]等于v
2407  user = true
2410  spin_lock_irq( & lock)
2411  如果user
2412  memcpy(i_lcoefs, u, u的长度)
2413  user_cost_model = true
2414  否则
2415  user_cost_model = false
2417  ioc_refresh_params(ioc, true)
2418  spin_unlock_irq( & lock)
2420  This is a counterpart of get_disk_and_module() and thus also of* get_gendisk().
2421  返回:nbytes
2423  einval :
2424  ret等于负EINVAL
2425  err :
2426  This is a counterpart of get_disk_and_module() and thus also of* get_gendisk().
2427  返回:ret