Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:blk_mq_alloc_and_init_hctx

Proto:static struct blk_mq_hw_ctx *blk_mq_alloc_and_init_hctx(struct blk_mq_tag_set *set, struct request_queue *q, int hctx_idx, int node)

Type:struct blk_mq_hw_ctx

Parameter:

TypeParameterName
struct blk_mq_tag_set *set
struct request_queue *q
inthctx_idx
intnode
2717  hctx = NULL
2720  spin_lock( & unused_hctx_lock)
2722  If @numa_node: NUMA node the storage adapter has been connected to. == node Then
2723  hctx = tmp
2724  Break
2727  If hctx Then list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
2729  spin_unlock( & unused_hctx_lock)
2731  If Not hctx Then hctx = blk_mq_alloc_hctx(q, set, node)
2733  If Not hctx Then Go to fail
2736  If blk_mq_init_hctx(q, set, hctx, hctx_idx) Then Go to free_hctx
2739  Return hctx
2741  free_hctx :
2742  kobject_put() - Decrement refcount for object.*@kobj: object.* Decrement the refcount, and if 0, call kobject_cleanup().
2743  fail :
2744  Return NULL
Caller
NameDescribe
blk_mq_realloc_hw_ctxs