blkcg_print_blkgs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– blkcg_print_blkgs(9) πŸ’–

okay so welcome to the Kernel API Manual, bestie β€” today's main character is blkcg_print_blkgs(9), and honestly? she's a helper. a little printing helper. a per-blkg data princess. let's get into it πŸŽ€


✨ NAME ✨

blkcg_print_blkgs β€” the helper for printing per-blkg data, periodt πŸ’…


🌸 SYNOPSIS 🌸

void blkcg_print_blkgs (struct seq_file *sf , struct blkcg *blkcg , u64
(*prfill)(struct seq_file *, struct blkg_policy_data *, int) , const
struct blkcg_policy *pol , int data , bool show_total );

like yes she takes six whole arguments, she's highkey booked and busy πŸ¦‹


🧚 ARGUMENTS 🧚

  • sf β€” the seq_file we're printing into. the canvas. the vibe recipient ✨
  • blkcg β€” the blkcg of interest. the one we care about. the main character πŸ’…
  • prfill β€” the fill function, aka the thing that actually prints out a blkg. she's the talent πŸŽ€
  • pol β€” the policy in question. iykyk πŸ‘‘
  • data β€” the data being handed off to prfill. a little gift 🎁
  • show_total β€” whether to print out the sum of prfill's return values or not. yes or no, bestie 🫢

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea: this function invokes prfill on each blkg of blkcg β€” but only if the pd for the policy specified by pol exists. no pd, no party πŸ™ˆ

prfill gets invoked with sf, the policy data, and data, and all of that happens under RCU read lock. noted. respected. ⭐

and if show_total is true, the sum of the return values from prfill gets printed with a "Total" label at the end. slay, a little summation moment πŸ”₯

real talk: this is to be used to construct print functions for cftype->read_seq_string. that's the whole point. that's her job 🧚

🌈 SEE ALSO 🌈

Kernel file ./block/blk-cgroup.c

the whole friend group, no cap:

like, that's the entire group chat and every single one of them is iconic πŸ’–


and that's the page, bestie!! 🫢 this one came to you from the ./block corner of the kernel, dated October 2026 β€” go forth, print your per-blkg data, and remember: RCU read lock is not a suggestion πŸ’€βœ¨

πŸ“¦ where this page comes from