Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:All allocations will be freed in release handler of q->mq_kobj

Proto:static int blk_mq_alloc_ctxs(struct request_queue *q)

Type:int

Parameter:

TypeParameterName
struct request_queue *q
2608  ctxs = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
2609  If Not ctxs Then Return -ENOMEM
2612  queue_ctx = alloc_percpu(structblk_mq_ctx)
2613  If Not queue_ctx Then Go to fail
2616  for_each_possible_cpu(cpu)
2617  ctx = per_cpu_ptr(queue_ctx, cpu)
2618  ctxs = ctxs
2621  * mq queue kobject = kobj
2622  sw queues = queue_ctx
2624  Return 0
2625  fail :
2626  kfree(ctxs)
2627  Return -ENOMEM
Caller
NameDescribe
blk_mq_init_allocated_queue