Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-mq.c Create Date:2022-07-28 17:12:00
Last Modify:2020-03-17 23:18:05 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:blk_mq_update_nr_requests

Proto:int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr)

Type:int

Parameter:

TypeParameterName
struct request_queue *q
unsigned intnr
3123  set = tag_set
3127  If Not set Then Return -EINVAL
3130  If Max # of requests == nr Then Return 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  If Not @tags: Tags owned by the block driver. A tag at this set is only* assigned when a request is dispatched from a hardware queue. Then Continue
3144  If Not @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. Then
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  Else
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  If ret Then Break
3153  If elevator && depth_updated Then depth_updated(hctx)
3157  If Not ret Then 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  Return ret