函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lkcg_init_queue - initialize blkcg part of request queue*@q: request_queue to initialize* Called from blk_alloc_queue_node(). Responsible for initializing blkcg* part of new request_queue @q.* RETURNS:* 0 on success, -errno on failure.

函数原型:int blkcg_init_queue(struct request_queue *q)

返回类型:int

参数:

类型参数名称
struct request_queue *q
1025  new_blkg等于lkg_alloc - allocate a blkg*@blkcg: block cgroup the new blkg is associated with*@q: request_queue the new blkg is associated with*@gfp_mask: allocation mask to use* Allocate a new blkg assocating @blkcg and @q.
1026  如果非new_blkg则返回:负ENOMEM
1029  preloaded等于非Load up this CPU's radix_tree_node buffer with sufficient objects to* ensure that the addition of a single element in the tree cannot fail
1032  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1033  spin_lock_irq( & queue_lock)
1034  blkg等于If @new_blkg is %NULL, this function tries to allocate a new one as* necessary using %GFP_NOWAIT. @new_blkg is always consumed on return.
1035  如果是错误则转到:err_unlock
1037  root_blkg等于blkg
1038  spin_unlock_irq( & queue_lock)
1039  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1041  如果preloadedradix_tree_preload_end()
1044  ret等于blk_iolatency_init(q)
1045  如果ret则转到:err_destroy_all
1048  ret等于blk_throtl_init(q)
1049  如果ret则转到:err_destroy_all
1051  返回:0
1053  err_destroy_all :
1054  lkg_destroy_all - destroy all blkgs associated with a request_queue*@q: request_queue of interest* Destroy all blkgs associated with @q.
1055  返回:ret
1056  err_unlock :
1057  spin_unlock_irq( & queue_lock)
1058  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1059  如果preloadedradix_tree_preload_end()
1061  返回:错误