| Function report | 
| Source Code: block\blk-iocost.c | Create Date:2022-07-28 17:49:46 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:ioc_cost_model_write
Proto:static ssize_t ioc_cost_model_write(struct kernfs_open_file *of, char *input, size_t nbytes, loff_t off)
Type:ssize_t
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct kernfs_open_file * | of | |
| char * | input | |
| size_t | nbytes | |
| loff_t | off | 
| 2363 | If Not ioc Then | 
| 2370 | spin_lock_irq( & lock) | 
| 2372 | user = user_cost_model | 
| 2373 | spin_unlock_irq( & lock) | 
| 2381 | If Not p Then Continue | 
| 2385 | Case match_token(p, cost_ctrl_tokens, args) == COST_CTRL | 
| 2391 | Else Go to einval | 
| 2393 | Continue | 
| 2394 | Case match_token(p, cost_ctrl_tokens, args) == COST_MODEL | 
| 2398 | Continue | 
| 2401 | tok = match_token(p, i_lcoef_tokens, args) | 
| 2402 | If tok == NR_I_LCOEFS Then Go to einval | 
| 2407 | user = true | 
| 2410 | spin_lock_irq( & lock) | 
| 2411 | If user Then | 
| 2413 | user_cost_model = true | 
| 2414 | Else | 
| 2415 | user_cost_model = false | 
| 2417 | ioc_refresh_params(ioc, true) | 
| 2418 | spin_unlock_irq( & lock) | 
| 2421 | Return nbytes | 
| 2423 | einval : | 
| 2425 | err : | 
| 2427 | Return ret | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |