Function report |
Source Code:block\blk-mq-tag.c |
Create Date:2022-07-28 17:12:45 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:blk_mq_get_tag
Proto:unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data)
Type:unsigned int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct blk_mq_alloc_data * | data |
| 104 | tags = blk_mq_tags_from_data(data) |
| 111 | If flags & BLK_MQ_REQ_RESERVED Then |
| 118 | Else |
| 119 | bt = bitmap_tags |
| 120 | tag_offset = nr_reserved_tags |
| 123 | tag = __blk_mq_get_tag(data, bt) |
| 127 | If flags & BLK_MQ_REQ_NOWAIT Then Return BLK_MQ_TAG_FAIL |
| 130 | ws = bt_wait_ptr(bt, hctx) |
| 131 | Do |
| 139 | blk_mq_run_hw_queue(hctx, false) |
| 145 | tag = __blk_mq_get_tag(data, bt) |
| 146 | If tag != -1 Then Break |
| 149 | sbitmap_prepare_to_wait(bt, ws, & wait, TASK_UNINTERRUPTIBLE) |
| 151 | tag = __blk_mq_get_tag(data, bt) |
| 152 | If tag != -1 Then Break |
| 156 | io_schedule() |
| 158 | sbitmap_finish_wait(bt, ws, & wait) |
| 161 | hctx = lk_mq_map_queue() - map (cmd_flags,type) to hardware queue*@q: request queue*@flags: request command flags*@cpu: cpu ctx |
| 163 | tags = blk_mq_tags_from_data(data) |
| 164 | If flags & BLK_MQ_REQ_RESERVED Then bt = breserved_tags |
| 166 | Else bt = bitmap_tags |
| 174 | If bt != bt_prev Then sbitmap_queue_wake_up(bt_prev) |
| 177 | ws = bt_wait_ptr(bt, hctx) |
| 178 | When 1 cycle |
| 180 | sbitmap_finish_wait(bt, ws, & wait) |
| 182 | found_tag : |
| 183 | Return tag + tag_offset |
| Name | Describe |
|---|---|
| blk_mq_get_driver_tag |
| 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 |