blkg_for_ea...cendant_post(9)
π blkg_for_ea...cendant_post(9) πΈ
okay bestie, strap in β this one lives in the Kernel API Manual (yes, the whole manual, it's giving very official π) and it's a macro for walking a blkg's descendants in post-order. the truncated name is literally canon, don't come for me, that's how the page is titled β¨
β¨ NAME β¨
blkg_for_each_descendant_post β a post-order walk of a blkg's descendants π¦
π SYNOPSIS π
blkg_for_each_descendant_post (d_blkg , pos_css , p_blkg );
no cap, that's the whole signature, spaces and all π
πΈ ARGUMENTS πΈ
d_blkgβ the loop cursor, aka the little pointer that's currently vibing on whichever descendant we're at rn π«Άpos_cssβ the thing used for iteration. it's doing the behind-the-scenes work, main character energy but off-screen πp_blkgβ the target blkg whose descendants we're walking. the whole reason we're here, fr fr π
π DESCRIPTION π
so this is basically the sibling of blkg_for_each_descendant_pre, except instead of pre-order traversal it does post-order traversal instead. think "children first, then the parent" β the way that it visits the leaves before the root is honestly iconic π
the synchronization rules are the same as the pre version. same rules, no extra lore, don't overthink it π§
and here's the important bit, bestie: p_blkg is included in the iteration and it's the last node to be visited. so it's not just the descendants β the target itself shows up at the end of the walk. periodt. π
π¦ SEE ALSO π¦
kernel file ./block/blk-cgroup.h and its whole friend group:
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_pre(9)blkcg_set_delay(9)blkcg_clear_delay(9)blk_cgroup_mergeable(9)
iykyk π
and that's the tea π β this page ships from ./block, dated October 2026, so go forth and traverse in post-order, bestie. slay β¨π
π
π¦ 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