函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:struct blkcg_gq *__blkg_lookup_create(struct blkcg *blkcg, struct request_queue *q)

返回类型:struct blkcg_gq

参数:

类型参数名称
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  如果blkg则返回:blkg
348  当(true)循环
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 parent循环
355  如果blkg
357  ret_blkg等于blkg
358  退出
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  如果是错误则返回:ret_blkg
367  如果pos恒等于blkcg则返回:blkg
调用者
名称描述
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.