函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-mq-tag.c Create Date:2022-07-27 18:48:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:blk_mq_get_tag

函数原型:unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data)

返回类型:unsigned int

参数:

类型参数名称
struct blk_mq_alloc_data *data
104  tags等于blk_mq_tags_from_data(data)
111  如果flags按位与BLK_MQ_REQ_RESERVED
113  WARN_ON_ONCE(1)
114  返回:BLK_MQ_TAG_FAIL
116  bt等于breserved_tags
117  tag_offset等于0
118  否则
119  bt等于bitmap_tags
120  tag_offset等于nr_reserved_tags
123  tag等于__blk_mq_get_tag(data, bt)
124  如果tag不等于负1则转到:found_tag
127  如果flags按位与BLK_MQ_REQ_NOWAIT则返回:BLK_MQ_TAG_FAIL
130  ws等于bt_wait_ptr(bt, hctx)
131  循环
139  blk_mq_run_hw_queue(hctx, false)
145  tag等于__blk_mq_get_tag(data, bt)
146  如果tag不等于负1则退出
149  sbitmap_prepare_to_wait(bt, ws, & wait, 深度睡眠态)
151  tag等于__blk_mq_get_tag(data, bt)
152  如果tag不等于负1则退出
155  bt_prev等于bt
156  io_schedule()
158  sbitmap_finish_wait(bt, ws, & wait)
160  input & output parameter 等于This assumes per-cpu software queueing queues. They could be per-node* as well, for instance. For now this is hardcoded as-is. Note that we don't* care about preemption, since we know the ctx's are persistent. This does
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  如果flags按位与BLK_MQ_REQ_RESERVEDbt等于breserved_tags
166  否则bt等于bitmap_tags
174  如果bt不等于bt_prevsbitmap_queue_wake_up(bt_prev)
177  ws等于bt_wait_ptr(bt, hctx)
178  当1循环
180  sbitmap_finish_wait(bt, ws, & wait)
182  found_tag :
183  返回:tagtag_offset
调用者
名称描述
blk_mq_get_driver_tag