函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blk_mq_update_nr_requests

函数原型:int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr)

返回类型:int

参数:

类型参数名称
struct request_queue *q
unsigned intnr
3123  set等于tag_set
3127  如果非set则返回:负EINVAL
3130  如果 Max # of requests 恒等于nr则返回:0
3133  blk_mq_freeze_queue(q)
3134  lk_mq_quiesce_queue() - wait until all ongoing dispatches have finished*@q: request queue
3136  ret等于0
3138  如果非@tags: Tags owned by the block driver. A tag at this set is only* assigned when a request is dispatched from a hardware queue.则继续下一循环
3144  如果非@sched_tags: Tags owned by I/O scheduler. If there is an I/O* scheduler associated with a request queue, a tag is assigned when* that request is allocated. Else, this member is not used.
3145  ret等于blk_mq_tag_update_depth(hctx, & @tags: Tags owned by the block driver. A tag at this set is only* assigned when a request is dispatched from a hardware queue., nr, false)
3147  否则
3148  ret等于blk_mq_tag_update_depth(hctx, & @sched_tags: Tags owned by I/O scheduler. If there is an I/O* scheduler associated with a request queue, a tag is assigned when* that request is allocated. Else, this member is not used., nr, true)
3151  如果ret退出
3153  如果elevatordepth_updateddepth_updated(hctx)
3157  如果非ret Max # of requests 等于nr
3160  lk_mq_unquiesce_queue() - counterpart of blk_mq_quiesce_queue()*@q: request queue.* This function recovers queue into the state before quiescing* which is done by blk_mq_quiesce_queue.
3161  blk_mq_unfreeze_queue(q)
3163  返回:ret