blkg_alloc(9)
π blkg_alloc(9) π
okay bestie, welcome to the blkg_alloc(9) page from the Kernel API Manual β this is the group chat where we learn how to allocate a blkg without losing our minds π«Άβ¨
π NAME π
blkg_alloc β allocate a blkg. no cap, that's literally the name π
β¨ SYNOPSIS β¨
struct blkcg_gq * blkg_alloc (struct blkcg *blkcg , struct gendisk *disk
, gfp_t gfp_mask );
π ARGUMENTS π
blkcgβ block cgroup the new blkg is associated with π«Άdiskβ gendisk the new blkg is associated with πgfp_maskβ allocation mask to use β¨
πΈ DESCRIPTION πΈ
okay so this function allocates a new blkg, and it associates blkcg and disk with it π that's the whole vibe. lowkey iconic, highkey useful.
π¦ SEE ALSO π¦
kernel file: ./block/blk-cgroup.c β yes, that's where the magic lives, bestie π§
blkcg_css(9)blkg_free(9)bio_blkcg_css(9)blkcg_parent(9)blkg_lookup_create(9)blkcg_print_blkgs(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)
cute sign-off time: source/version is ./block, date is October 2026 β mwah πβ¨
π¦ 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