Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-cgroup.c Create Date:2022-07-28 17:40:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:int blkcg_init_queue(struct request_queue *q)

Type:int

Parameter:

TypeParameterName
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  If Not new_blkg Then Return -ENOMEM
1029  preloaded = Not 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  If IS_ERR(blkg) Then Go to 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  If preloaded Then radix_tree_preload_end()
1044  ret = blk_iolatency_init(q)
1045  If ret Then Go to err_destroy_all
1048  ret = blk_throtl_init(q)
1049  If ret Then Go to err_destroy_all
1051  Return 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  Return 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  If preloaded Then radix_tree_preload_end()
1061  Return PTR_ERR(blkg)