函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-core.c Create Date:2022-07-27 18:34:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:lk_alloc_queue_node - allocate a request queue*@gfp_mask: memory allocation flags*@node_id: NUMA node to allocate memory from

函数原型:struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)

返回类型:struct request_queue

参数:

类型参数名称
gfp_tgfp_mask
intnode_id
484  q等于在指定节点上分配一个对象
486  如果非q则返回:NULL
489  last_merge = NULL
491  * ida allocated id for this queue. Used to index queues from * ioctx.等于ida_simple_get( & blk_queue_ida, 0, 0, gfp_mask)
492  如果* ida allocated id for this queue. Used to index queues from * ioctx.小于0则转到:fail_q
495  ret等于set_init - Initialize a bio_set*@bs: pool to initialize*@pool_size: Number of bio and bio_vecs to cache in the mempool*@front_pad: Number of bytes to allocate in front of the returned bio*@flags: Flags to modify behavior, currently %BIOSET_NEED_BVECS* and
496  如果ret则转到:fail_id
499  backing_dev_info等于bdi_alloc_node(gfp_mask, node_id)
500  如果非backing_dev_info则转到:fail_split
503  stats等于blk_alloc_queue_stats()
504  如果非stats则转到:fail_stats
507  max readahead in PAGE_SIZE units 等于adahead.c
508  Device capabilities 等于BDI_CAP_CGROUP_WRITEBACK
509  name等于"block"
510  node等于node_id
512  imer_setup - prepare a timer for first use*@timer: the timer in question*@callback: the function to call when timer expires*@flags: any TIMER_* flags* Regular timer initialization should use either DEFINE_TIMER() above,* or timer_setup()( & laptop_mode_wb_timer, laptop_mode_timer_fn, 0)
514  imer_setup - prepare a timer for first use*@timer: the timer in question*@callback: the function to call when timer expires*@flags: any TIMER_* flags* Regular timer initialization should use either DEFINE_TIMER() above,* or timer_setup()( & timeout, blk_rq_timed_out_timer, 0)
515  INIT_WORK( & timeout_work, blk_timeout_work)
516  初始化链表头
518  初始化链表头
521  kobject_init() - Initialize a kobject structure
526  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.( & sysfs_lock)
527  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.( & sysfs_dir_lock)
528  spin_lock_init( & queue_lock)
530  init_waitqueue_head( & mq_freeze_wq)
531  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.( & * Protect concurrent access to q_usage_counter by * percpu_ref_kill() and percpu_ref_reinit().)
537  如果percpu_ref_init - initialize a percpu refcount*@ref: percpu_ref to initialize*@release: function which will be called when refcount hits 0*@flags: PERCPU_REF_INIT_* flags*@gfp: allocation mask to use* Initializes @ref则转到:fail_bdi
542  如果blkcg_init_queue(q)则转到:fail_ref
545  返回:q
547  fail_ref :
548  percpu_ref_exit - undo percpu_ref_init()*@ref: percpu_ref to exit* This function exits @ref
549  fail_bdi :
550  blk_free_queue_stats(stats)
551  fail_stats :
552  bdi_put(backing_dev_info)
553  fail_split :
554  set_exit - exit a bioset initialized with bioset_init()* May be called on a zeroed but uninitialized bioset (i.e. allocated with* kzalloc()).
555  fail_id :
556  ida_simple_remove( & blk_queue_ida, * ida allocated id for this queue. Used to index queues from * ioctx.)
557  fail_q :
558  kmem_cache_free(For queue allocation, q)
559  返回:NULL
调用者
名称描述
blk_alloc_queue
blk_mq_init_queue