blkg_for_eac...scendant_pre(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:


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