blkg_conf_prep(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

Okay so bestie, this is blkg_conf_prep(9) from the Kernel API Manual β€” and it's literally the function that parses and prepares for a per-blkg config update. No cap, it's giving main character energy for cgroup config vibes. πŸ’…


🌸 SYNOPSIS 🌸

int blkg_conf_prep (struct blkcg *blkcg , const struct blkcg_policy *pol
, struct blkg_conf_ctx *ctx );

πŸŽ€ ARGUMENTS πŸŽ€

  • blkcg β€” the target block cgroup, aka the cgroup you're trying to update. Slay.
  • pol β€” the target policy. The rules that govern how the cgroup behaves. Iconic.
  • ctx β€” a blkg_conf_ctx that's already been initialized with blkg_conf_init. Don't skip this step, bestie.

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: blkg_conf_prep parses a per-blkg config update from ctx->input and sets up ctx accordingly. It's literally reading your config string and getting everything ready for the actual update. πŸ”₯

On success β€” and only on success β€” here's what you get:

  • ctx->body points to the part of ctx->input that comes after the MAJ:MIN part. Like, it skips the device identifier and hands you the rest.
  • ctx->bdev points to the target block device. That's your block device, bestie.
  • ctx->blkg points to the blkg being configured. The actual cgroup block thing being updated.
⚠️ Important caveat: blkg_conf_open_bdev must be called on ctx beforehand. Do not skip this. It's not a vibe to skip it.
⚠️ Also important: On success, this function returns with the queue lock held, and it must be followed by blkg_conf_close_bdev. That's the cleanup step. Don't leave the lock hanging, that's not the move. πŸ”’

🌈 SEE ALSO 🌈

Kernel file ./block/blk-cgroup.c β€” and then it's a whole friend group of related functions: blkcg_css(9), blkg_free(9), bio_blkcg_css(9), blkcg_parent(9), blkg_alloc(9), blkg_lookup_create(9), blkcg_print_blkgs(9), __blkg_prfill_u64(9), blkg_conf_init(9), blkg_conf_open_bdev(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). That's the whole squad. πŸ’–


πŸ’– Written by your fave Unix bestie | From the ./block directory, source version October 2026 | Page: blkg_conf_prep(9) | Now go config those blkgs, queen! πŸ‘‘βœ¨

πŸ“¦ where this page comes from