blkg_for_ea...cendant_post(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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