函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-ioc.c Create Date:2022-07-27 18:39:47
Last Modify:2020-03-17 23:16:06 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:_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

函数原型:struct io_cq *ioc_create_icq(struct io_context *ioc, struct request_queue *q, gfp_t gfp_mask)

返回类型:struct io_cq

参数:

类型参数名称
struct io_context *ioc
struct request_queue *q
gfp_tgfp_mask
368  et等于type
372  icq等于在指定节点上分配一个对象
374  如果非icq则返回:NULL
377  如果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则
378  kmem_cache_free( managed by elevator core , icq)
379  返回:NULL
382  ioc等于ioc
383  >icq_list and icq->q_node by q lock.等于q
384  初始化链表头
385  INIT_HLIST_NODE( & ioc_node)
388  spin_lock_irq( & queue_lock)
389  加自旋锁
391  如果此条件成立可能性大(为编译器优化)(!在radix树中插入节点)则
392  hlist_add_head( & ioc_node, & icq_list)
393  添加链表项
394  如果init_icqinit_icq(icq)
396  否则
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  如果非icqprintk - 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  自旋锁解锁
404  spin_unlock_irq( & queue_lock)
405  radix_tree_preload_end()
406  返回:icq
调用者
名称描述
blk_mq_sched_assign_ioc