blkg_rwstat_recursive_sum(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 blkg_rwstat_recursive_sum(9) 🌸

okay bestie, welcome to the Kernel API Manual β€” this one's a little blkcg deep-dive and honestly it's giving "summon the whole family tree" energy πŸ’…


✨ NAME ✨

blkg_rwstat_recursive_sum β€” collect hierarchical blkg_rwstat πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

void blkg_rwstat_recursive_sum (struct blkcg_gq *blkg , struct
       blkcg_policy *pol , int off , struct blkg_rwstat_sample *sum );

πŸ’– ARGUMENTS πŸ’–

  • blkg β€” the blkg of interest πŸ‘€ like, the one you actually care about
  • pol β€” the blkcg_policy that contains the blkg_rwstat
  • off β€” the offset to the blkg_rwstat in blkg_policy_data or blkg
  • sum β€” your blkg_rwstat_sample structure, aka where the results go 🫢

🌈 DESCRIPTION 🌈

So what this does: it collects the blkg_rwstat specified by blkg, pol and off and all its online descendants and their aux counts. the way it just scoops up the entire lineage… obsessed 😭

And here's the branching logic, no cap:

  • if pol is NULL, the blkg_rwstat is at off bytes into blkg
  • otherwise, it's at off bytes into blkg's blkg_policy_data of the policy ✨
fr fr, that pol check is the whole vibe check of this function β€” NULL means "raw offset into blkg", non-NULL means "go through the policy's blkg_policy_data". don't mix them up πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole thing, you ate that πŸ“πŸ’œ β€” this cutie lives in the ./block source tree and the file's dated October 2026. go forth and recurse, bestie 🧚✨

πŸ“¦ where this page comes from