函数逻辑报告 |
Source Code:block\blk-cgroup.c |
Create Date:2022-07-27 19:16:11 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:lkcg_activate_policy - activate a blkcg policy on a request_queue*@q: request_queue of interest*@pol: blkcg policy to activate* Activate @pol on @q
函数原型:int blkcg_activate_policy(struct request_queue *q, const struct blkcg_policy *pol)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct request_queue * | q | |
const struct blkcg_policy * | pol |
1241 | struct blkg_policy_data * pd_prealloc = NULL |
1242 | struct blkcg_gq * blkg, * pinned_blkg = NULL |
1245 | 如果blkcg_policy_enabled(q, pol)则返回:0 |
1248 | 如果queue_is_mq(q)则blk_mq_freeze_queue(q) |
1250 | retry : |
1251 | spin_lock_irq( & queue_lock) |
1261 | 如果blkg恒等于pinned_blkg则 |
1262 | pd等于pd_prealloc |
1263 | pd_prealloc = NULL |
1264 | 否则 |
1269 | 如果非pd则 |
1277 | pinned_blkg等于blkg |
1279 | spin_unlock_irq( & queue_lock) |
1281 | 如果pd_prealloc则pd_free_fn(pd_prealloc) |
1283 | pd_prealloc等于pd_alloc_fn(GFP_KERNEL, q, blkcg) |
1285 | 如果pd_prealloc则转到:retry |
1287 | 否则转到:enomem |
1299 | pd_init_fn(pd[plid]) |
1302 | ret等于0 |
1304 | spin_unlock_irq( & queue_lock) |
1305 | out : |
1306 | 如果queue_is_mq(q)则blk_mq_unfreeze_queue(q) |
1310 | 如果pd_prealloc则pd_free_fn(pd_prealloc) |
1312 | 返回:ret |
1314 | enomem : |
1316 | spin_lock_irq( & queue_lock) |
1319 | pd_free_fn(pd[plid]) |
1323 | spin_unlock_irq( & queue_lock) |
1325 | 转到:out |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |