| Function report | 
| Source Code: block\blk-mq.c | Create Date:2022-07-28 17:08:32 | 
| 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_rq_ctx_init
Proto:static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data, unsigned int tag, unsigned int op, u64 alloc_time_ns)
Type:struct request
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct blk_mq_alloc_data * | data | |
| unsigned int | tag | |
| unsigned int | op | |
| u64 | alloc_time_ns | 
| 275 | tags = blk_mq_tags_from_data(data) | 
| 276 | rq = static_rqs[tag] | 
| 277 | rq_flags = 0 | 
| 279 | If flags & BLK_MQ_REQ_INTERNAL Then | 
| 280 | tag = -1 | 
| 281 | internal_tag = tag | 
| 282 | Else | 
| 284 | rq_flags = rack inflight for MQ | 
| 288 | internal_tag = -1 | 
| 293 | q = input parameter | 
| 297 | op and common flags = op | 
| 298 | If flags & BLK_MQ_REQ_PREEMPT Then rq_flags |= set for "ide_preempt" requests and also for requests for which the SCSI"quiesce" state must be ignored. | 
| 300 | If blk_queue_io_stat( input parameter ) Then rq_flags |= account into disk and partition IO statistics | 
| 303 | INIT_HLIST_NODE( & merge hash ) | 
| 304 | RB_CLEAR_NODE( & sort/lookup ) | 
| 305 | rq_disk = NULL | 
| 306 | part = NULL | 
| 310 | If Only need start/end time stamping if we have iostat or* blk stats enabled, or using an IO scheduler. Then Time that this request was allocated for this IO. = ktime_get_ns() | 
| 312 | Else Time that this request was allocated for this IO. = 0 | 
| 316 | * Number of scatter-gather DMA addr+len pairs after * physical address coalescing is performed. = 0 | 
| 318 | nr_integrity_segments = 0 | 
| 321 | length of alignment and padding = 0 | 
| 322 | WRITE_ONCE(deadline, 0) | 
| 324 | timeout = 0 | 
| 326 | * completion callback. = NULL | 
| 327 | end_io_data = NULL | 
| 329 | cremented at dispatch time [Reads are always treated as synchronous, as are requests with the FUA or* PREFLUSH flag. Other operations may be marked as synchronous using the* REQ_SYNC flag.]++ | 
| 331 | Return rq | 
| Name | Describe | 
|---|---|
| blk_mq_get_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 |