blkcg_print_blkgs(9)
π 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β theseq_filewe're printing into. the canvas. the vibe recipient β¨blkcgβ theblkcgof interest. the one we care about. the main character πprfillβ the fill function, aka the thing that actually prints out ablkg. she's the talent πpolβ the policy in question. iykyk πdataβ the data being handed off toprfill. a little gift πshow_totalβ whether to print out the sum ofprfill'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:
blkcg_css(9)blkg_free(9)bio_blkcg_css(9)blkcg_parent(9)blkg_alloc(9)blkg_lookup_create(9)__blkg_prfill_u64(9)blkg_conf_init(9)blkg_conf_open_bdev(9)blkg_conf_prep(9)blkg_conf_unprep(9)blkg_conf_close_bdev(9)blkcg_destroy_blkgs(9)blkcg_pin_online(9)blkcg_unpin_online(9)blkcg_css_offline(9)blkcg_activate_policy(9)blkcg_deactivate_policy(9)blkcg_policy_register(9)blkcg_policy_unregister(9)blkcg_maybe_throttle_current(9)blkcg_schedule_throttle(9)blkcg_add_delay(9)blkg_tryget_closest(9)bio_associate_blkg_from_css(9)bio_associate_blkg(9)bio_clone_blkg_association(9)
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
- 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