blkg_rwstat_add(9)
π blkg_rwstat_add β from the Kernel API Manual, bestie β¨
Okay so real talk, this one's a little kernel function called blkg_rwstat_add, and it lives in the Kernel API Manual. Think of it as the glow-up your block-cgroup stats deserve π
πΈ NAME πΈ
blkg_rwstat_add β literally just adds a value to a blkg_rwstat. That's the whole vibe. No cap π«Ά
β¨ SYNOPSIS β¨
void blkg_rwstat_add (struct blkg_rwstat *rwstat , blk_opf_t opf ,
uint64_t val );
π ARGUMENTS π
rwstatβ the targetblkg_rwstat, aka the thing getting the add. Main character energy πopfβ theREQ_OPplus flags. It's giving "which counter are we even talking about" πvalβ the value you're adding. The actual number, the moment, the whole point π
π DESCRIPTION π
So you take val and you add it to rwstat. Simple. Iconic. The counters get chosen according to rw β yes, that's what the docs say, don't come for me π β and the way that works is the whole reason opf is sitting there with its flags.
β οΈ Big heads-up bestie: the caller is responsible for synchronizing calls to this function. Like, you. Not the function. It will not save you. Lock it down yourself or things get messy ππ
π¦ SEE ALSO π¦
Kernel file ./block/blk-cgroup-rwstat.h β and honestly the whole friend group:
That's the page, gorgeous π« it ships from ./block, dated October 2026, and the version tag is blkg_rwstat_add(9) β go forth and add your values, synchronized and slaying πβ
π¦ 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