函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blkg_destroy

函数原型:static void blkg_destroy(struct blkcg_gq *blkg)

返回类型:void

参数:

类型参数名称
struct blkcg_gq *blkg
398  blkcg等于blkcg
401  lockdep_assert_held( & queue_lock)
402  lockdep_assert_held( & lock)
405  WARN_ON_ONCE(链表为空)
406  WARN_ON_ONCE(hlist_unhashed( & blkcg_node))
408 i小于Maximum number of blkcg policies allowed to be registered concurrently.* Defined here to simplify include dependency.循环
409  pol等于blkcg_policy[i]
411  如果pd[i]且pd_offline_fnpd_offline_fn(pd[i])
415  is this blkg online? protected by both blkcg and q locks = false
417  删除radix树项目
418  删除链表项并重新初始化
419  hlist_del_init_rcu - deletes entry from hash list with re-initialization*@n: the element to delete from the hash list.* Note: list_unhashed() on the node return true after this. It is* useful for RCU based read lockfree traversal if the writer side
426  如果cu_access_pointer() - fetch RCU pointer with no dereferencing*@p: The pointer to read* Return the value of the specified RCU-protected pointer, but omit the* lockdep checks for being in an RCU read-side critical section(blkg_hint)恒等于blkgcu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(blkg_hint, NULL)
433  percpu_ref_kill - drop the initial ref*@ref: percpu_ref to kill* Must be used to drop the initial ref on a percpu refcount; must be called* precisely once before shutdown.* Switches @ref into atomic mode before gathering up the percpu counters
调用者
名称描述
blkg_destroy_alllkg_destroy_all - destroy all blkgs associated with a request_queue*@q: request_queue of interest* Destroy all blkgs associated with @q.
blkcg_destroy_blkgslkcg_destroy_blkgs - responsible for shooting down blkgs*@blkcg: blkcg of interest* blkgs should be removed while holding both q and blkcg locks