Function report | 
Source Code:block\blk-mq.c | 
Create Date:2022-07-28 17:08:39 | 
| Last Modify:2020-03-17 23:18:05 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:blk_mq_get_request
Proto:static struct request *blk_mq_get_request(struct request_queue *q, struct bio *bio, struct blk_mq_alloc_data *data)
Type:struct request
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct request_queue * | q | |
| struct bio * | bio | |
| struct blk_mq_alloc_data * | data | 
| 341 | bool clear_ctx_on_error = false | 
| 342 | alloc_time_ns = 0 | 
| 344 | blk_queue_enter_live(q) | 
| 347 | If blk_queue_rq_alloc_time(q) Then alloc_time_ns = ktime_get_ns() | 
| 350 | input parameter = q | 
| 351 | If Value is more likely to compile time(! input & output parameter ) Then | 
| 353 | clear_ctx_on_error = true | 
| 355 | If Value is more likely to compile time(!hctx) Then hctx = lk_mq_map_queue() - map (cmd_flags,type) to hardware queue*@q: request queue*@flags: request command flags*@cpu: cpu ctx | 
| 358 | If cmd_flags & REQ_NOWAIT Then flags |= BLK_MQ_REQ_NOWAIT | 
| 361 | If e Then | 
| 362 | flags |= BLK_MQ_REQ_INTERNAL | 
| 369 | If Not Check if the bio or request is one that needs special treatment in the* flush state machine. && limit_depth && Not (flags & BLK_MQ_REQ_RESERVED) Then limit_depth(cmd_flags, data) | 
| 373 | Else | 
| 374 | blk_mq_tag_busy(hctx) | 
| 377 | tag = blk_mq_get_tag(data) | 
| 378 | If tag == BLK_MQ_TAG_FAIL Then | 
| 379 | If clear_ctx_on_error Then input & output parameter = NULL | 
| 381 | blk_queue_exit(q) | 
| 382 | Return NULL | 
| 385 | rq = blk_mq_rq_ctx_init(data, tag, cmd_flags, alloc_time_ns) | 
| 387 | icq = NULL | 
| 388 | If e && prepare_request Then | 
| 389 | If managed by elevator core Then blk_mq_sched_assign_ioc(rq) | 
| 392 | prepare_request(rq, bio) | 
| 397 | Return rq | 
| Name | Describe | 
|---|---|
| blk_mq_alloc_request | |
| blk_mq_alloc_request_hctx | |
| blk_mq_make_request | 
| 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  |