函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Allocate the request maps associated with this tag_set. Note that this* may reduce the depth asked for, if memory is tight. set->queue_depth* will be updated to reflect the allocated depth.

函数原型:static int blk_mq_alloc_rq_maps(struct blk_mq_tag_set *set)

返回类型:int

参数:

类型参数名称
struct blk_mq_tag_set *set
2937  depth等于queue_depth
2938  循环
2939  err等于__blk_mq_alloc_rq_maps(set)
2940  如果非err退出
2943  queue_depth右移等于1位
2944  如果queue_depth小于reserved_tagsBLK_MQ_TAG_MIN
2945  err等于负ENOMEM
2946  退出
2948 queue_depth循环
2950  如果非queue_deptherr
2951  打印错误信息("blk-mq: failed to allocate request map\n")
2952  返回:负ENOMEM
2955  如果depth不等于queue_depth打印信息("blk-mq: reduced tag depth (%u -> %u)\n", depth, queue_depth)
2959  返回:0
调用者
名称描述
blk_mq_alloc_tag_setAlloc a tag set to be associated with one or more request queues.* May fail with EINVAL for various error conditions. May adjust the* requested depth down, if it's too large. In that case, the set* value will be stored in set->queue_depth.