Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-ioc.c Create Date:2022-07-28 17:04:31
Last Modify:2020-03-17 23:16:06 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:_create_icq - create and link io_cq*@ioc: io_context of interest*@q: request_queue of interest*@gfp_mask: allocation mask* Make sure io_cq linking @ioc and @q exists

Proto:struct io_cq *ioc_create_icq(struct io_context *ioc, struct request_queue *q, gfp_t gfp_mask)

Type:struct io_cq

Parameter:

TypeParameterName
struct io_context *ioc
struct request_queue *q
gfp_tgfp_mask
368  et = type
372  icq = kmem_cache_alloc_node( managed by elevator core , gfp_mask | __GFP_ZERO, node)
374  If Not icq Then Return NULL
377  If The same as above function, except we don't guarantee preloading happens.* We do it, if we decide it helps. On success, return zero with preemption* disabled. On error, return -ENOMEM with preemption not disabled. < 0 Then
378  kmem_cache_free( managed by elevator core , icq)
379  Return NULL
382  ioc = ioc
383  >icq_list and icq->q_node by q lock. = q
384  Initialization list head
385  INIT_HLIST_NODE( & ioc_node)
388  spin_lock_irq( & queue_lock)
389  spin_lock( & all the fields below are protected by this lock )
391  If Value is more likely to compile time(!__radix_tree_insert - insert into a radix tree*@root: radix tree root*@index: index key*@item: item to insert* Insert an item into the radix tree at position @index.) Then
392  hlist_add_head( & ioc_node, & icq_list)
393  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
394  If init_icq Then init_icq(icq)
396  Else
397  kmem_cache_free( managed by elevator core , icq)
398  icq = _lookup_icq - lookup io_cq from ioc*@ioc: the associated io_context*@q: the associated request_queue* Look up io_cq associated with @ioc - @q pair from @ioc. Must be called* with @q->queue_lock held.
399  If Not icq Then printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
403  spin_unlock( & all the fields below are protected by this lock )
404  spin_unlock_irq( & queue_lock)
405  radix_tree_preload_end()
406  Return icq
Caller
NameDescribe
blk_mq_sched_assign_ioc