blkg_rwstat_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 target blkg_rwstat, aka the thing getting the add. Main character energy πŸ‘‘
  • opf β€” the REQ_OP plus 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