Function report |
Source Code:block\blk-mq.c |
Create Date:2022-07-28 17:11:54 |
Last Modify:2020-03-17 23:18:05 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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.
Proto:int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
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 | If Not nr_hw_queues Then Return -EINVAL |
3028 | If Not queue_depth Then Return -EINVAL |
3030 | If queue_depth < reserved_tags + BLK_MQ_TAG_MIN Then Return -EINVAL |
3036 | If Not get_budget ^ Not put_budget Then Return -EINVAL |
3039 | If queue_depth > BLK_MQ_MAX_DEPTH Then |
3040 | pr_info("blk-mq: reduced tag depth to %u\n", BLK_MQ_MAX_DEPTH) |
3042 | queue_depth = BLK_MQ_MAX_DEPTH |
3047 | Else if nr_maps > HCTX_MAX_TYPES Then Return -EINVAL |
3055 | If is_kdump_kernel() Then |
3056 | nr_hw_queues = 1 |
3057 | nr_maps = 1 |
3064 | If nr_maps == 1 && nr_hw_queues > Setup number of possible processor ids Then nr_hw_queues = Setup number of possible processor ids |
3067 | If blk_mq_realloc_tag_set_tags(set, 0, nr_hw_queues) < 0 Then Return -ENOMEM |
3072 | mq_map = kcalloc_node(Setup number of possible processor ids , size of mq_map[0] , GFP_KERNEL, numa_node) |
3075 | If Not mq_map Then Go to out_free_mq_map |
3077 | nr_queues = If is_kdump_kernel() Then 1 Else nr_hw_queues |
3080 | ret = blk_mq_update_queue_map(set) |
3081 | If ret Then Go to out_free_mq_map |
3085 | If ret Then Go to 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) |
3091 | Return 0 |
3093 | out_free_mq_map : |
3099 | tags = NULL |
3100 | Return ret |
Name | Describe |
---|---|
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 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |