blkg_for_eac...scendant_pre(9)
β¨ NAME β¨
Hiii bestie! Welcome to the Kernel API Manual β todayβs page is blkg_for_eac...scendant_pre(9), and the actual NAME is blkg_for_each_descendant_pre, which does a pre-order walk of a blkg's descendants. π¦
π SYNOPSIS π
blkg_for_each_descendant_pre (d_blkg , pos_css , p_blkg );
π¦ ARGUMENTS π¦
d_blkgβ your loop cursor, pointing at the current descendant. πpos_cssβ this one is used for iteration, fr fr.p_blkgβ the target blkg whose descendants youβre walking. πΈ
π DESCRIPTION π
Okay so the walk sends c_blkg through the descendants of p_blkg. Simple queen behavior. π
π¨ bestie, this must be used with RCU read locked. No cap, do not skip this.
If you call it under either the blkcg lock or the queue lock, the iteration is guaranteed to include all and only online blkgs. So: all the online besties, and only the online besties. β¨
The caller may update pos_css by calling css_rightmost_descendant to skip a subtree. Thatβs your little shortcut era. π
And yes β p_blkg is included in the iteration, and itβs literally the first node to be visited. Main character energy from the jump. π
π SEE ALSO π
Kernel file ./block/blk-cgroup.h is the home base π β also go peek at these:
bio_issue_as_root_blkg(9)blkg_lookup(9)blkg_to_pd(9)pd_to_blkg(9)blkg_get(9)blkg_tryget(9)blkg_put(9)blkg_for_each_descendant_post(9)blkcg_set_delay(9)blkcg_clear_delay(9)blk_cgroup_mergeable(9)
okay bye bestie π«Ά this page lives in ./block, dated October 2026, and itβs the blkg_for_eac...scendant_pre(9) page β mwah π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms