函数逻辑报告 |
Source Code:block\blk-mq.c |
Create Date:2022-07-27 18:47:15 |
Last Modify:2020-03-17 23:18:05 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Alloc 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.
函数原型:int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct blk_mq_tag_set * | set |
3024 | BUILD_BUG_ON - break compile if a condition is true(BLK_MQ_MAX_DEPTH > 1 << BLK_MQ_UNIQUE_TAG_BITS) |
3026 | 如果非nr_hw_queues则返回:负EINVAL |
3028 | 如果非queue_depth则返回:负EINVAL |
3030 | 如果queue_depth小于reserved_tags加BLK_MQ_TAG_MIN则返回:负EINVAL |
3036 | 如果非get_budget按位异或非put_budget则返回:负EINVAL |
3039 | 如果queue_depth大于BLK_MQ_MAX_DEPTH则 |
3040 | 打印信息("blk-mq: reduced tag depth to %u\n", BLK_MQ_MAX_DEPTH) |
3042 | queue_depth等于BLK_MQ_MAX_DEPTH |
3047 | 否则如果nr_maps大于HCTX_MAX_TYPES则返回:负EINVAL |
3055 | 如果is_kdump_kernel()则 |
3064 | 如果nr_maps恒等于1且nr_hw_queues大于CPU数量则nr_hw_queues等于CPU数量 |
3067 | 如果blk_mq_realloc_tag_set_tags(set, 0, nr_hw_queues)小于0则返回:负ENOMEM |
3072 | mq_map等于kcalloc_node(CPU数量, mq_map[0]的长度, GFP_KERNEL, numa_node) |
3075 | 如果非mq_map则转到:out_free_mq_map |
3077 | nr_queues等于如果is_kdump_kernel()则1否则nr_hw_queues |
3080 | ret等于blk_mq_update_queue_map(set) |
3081 | 如果ret则转到:out_free_mq_map |
3084 | ret等于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. |
3085 | 如果ret则转到:out_free_mq_map |
3088 | mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & tag_list_lock) |
3089 | 初始化链表头 |
3091 | 返回:0 |
3093 | out_free_mq_map : |
3098 | 释放内存 |
3099 | tags = NULL |
3100 | 返回:ret |
名称 | 描述 |
---|---|
blk_mq_init_sq_queue | Helper for setting up a queue with mq ops, given queue depth, and* the passed in mq ops flags. |
bsg_setup_queue | sg_setup_queue - Create and add the bsg hooks so we can receive requests*@dev: device to attach bsg device to*@name: device to give bsg device*@job_fn: bsg job handler*@timeout: timeout handler function pointer*@dd_job_size: size of LLD data needed for |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |