Function report |
Source Code:block\blk-cgroup.c |
Create Date:2022-07-28 17:40:36 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:int blkcg_activate_policy(struct request_queue *q, const struct blkcg_policy *pol)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| 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 | If blkcg_policy_enabled(q, pol) Then Return 0 |
| 1248 | If queue_is_mq(q) Then blk_mq_freeze_queue(q) |
| 1250 | retry : |
| 1251 | spin_lock_irq( & queue_lock) |
| 1261 | If blkg == pinned_blkg Then |
| 1262 | pd = pd_prealloc |
| 1263 | pd_prealloc = NULL |
| 1264 | Else |
| 1269 | If Not pd Then |
| 1277 | pinned_blkg = blkg |
| 1279 | spin_unlock_irq( & queue_lock) |
| 1281 | If pd_prealloc Then pd_free_fn(pd_prealloc) |
| 1283 | pd_prealloc = pd_alloc_fn(GFP_KERNEL, q, blkcg) |
| 1285 | If pd_prealloc Then Go to retry |
| 1287 | Else Go to enomem |
| 1299 | pd_init_fn(pd[plid]) |
| 1302 | ret = 0 |
| 1304 | spin_unlock_irq( & queue_lock) |
| 1305 | out : |
| 1306 | If queue_is_mq(q) Then blk_mq_unfreeze_queue(q) |
| 1310 | If pd_prealloc Then pd_free_fn(pd_prealloc) |
| 1312 | Return ret |
| 1314 | enomem : |
| 1316 | spin_lock_irq( & queue_lock) |
| 1319 | pd_free_fn(pd[plid]) |
| 1323 | spin_unlock_irq( & queue_lock) |
| 1325 | Go to out |
| Name | Describe |
|---|---|
| blk_throtl_init | |
| blk_iolatency_init | |
| blk_iocost_init |
| 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 |