Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__blkg_lookup_create - lookup blkg, try to create one if not there*@blkcg: blkcg of interest*@q: request_queue of interest* Lookup blkg for the @blkcg - @q pair. If it doesn't exist, try to* create one

Proto:struct blkcg_gq *__blkg_lookup_create(struct blkcg *blkcg, struct request_queue *q)

Type:struct blkcg_gq

Parameter:

TypeParameterName
struct blkcg *blkcg
struct request_queue *q
336  WARN_ON_ONCE(!_read_lock_held() - might we be in RCU read-side critical section?* If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an RCU* read-side critical section)
337  lockdep_assert_held( & queue_lock)
339  blkg = __blkg_lookup - internal version of blkg_lookup()*@blkcg: blkcg of interest*@q: request_queue of interest*@update_hint: whether to update lookup hint with the result or not* This is internal version and shouldn't be used by policy* implementations
340  If blkg Then Return blkg
348  When (true) cycle
349  pos = blkcg
350  parent = lkcg_parent - get the parent of a blkcg*@blkcg: blkcg of interest* Return the parent blkcg of @blkcg. Can be called anytime.
351  ret_blkg = root_blkg
353  When parent cycle
355  If blkg Then
357  ret_blkg = blkg
358  Break
360  pos = parent
364  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.
365  If IS_ERR(blkg) Then Return ret_blkg
367  If pos == blkcg Then Return blkg
Caller
NameDescribe
blkg_lookup_createlkg_lookup_create - find or create a blkg*@blkcg: target block cgroup*@q: target request_queue* This looks up or creates the blkg representing the unique pair* of the blkcg and the request_queue.