blkcg_destroy_blkgs(9)
π NAME π
okay bestie, welcome to the blkcg_destroy_blkgs(9) page from the Kernel API Manual β¨ This function is literally responsible for shooting down blkgs β thatβs the whole NAME vibe π―π
πΈ SYNOPSIS πΈ
void blkcg_destroy_blkgs (struct blkcg *blkcg );
π ARGUMENTS π
blkcgβ theblkcgof interest, aka the one youβre looking at ππ
π¦ DESCRIPTION π¦
so hereβs the tea: blkgs should be removed while holding both q and blkcg locks ππ. and because the blkcg lock is nested inside the q lock, this function performs reverse double lock dancing ππΊ β yes, thatβs the actual phrase, and itβs iconic.
Destroying the blkgs releases the reference held on the blkcgβs css, allowing blkcg_css_free to eventually be called β¨ chain reaction, but make it kernel π§π
this is the blkcg counterpart of ioc_release_fn π«Ά
π₯ SEE ALSO π₯
Kernel file ./block/blk-cgroup.c is the home base for all this π and hereβs the whole friend group:
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_prep(9)blkg_conf_unprep(9)blkg_conf_close_bdev(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 page, bestie π
sending u a kiss from ./block, dated October 2026, for blkcg_destroy_blkgs(9) β 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