blkg_tryget_closest(9)
π blkg_tryget_closest(9) π
okay bestie, welcome to the Kernel API Manual page for blkg_tryget_closest(9) β yes, that's the whole title vibe, and we're gonna get through it together π
π NAME π
blkg_tryget_closest β βtry and get a blkg ref on the closet blkg.β The page literally says βclosetβ and I'm not fixing it, that's iconic π
β¨ SYNOPSIS β¨
Here's the signature, copied exactly because we do not mess with code in this group chat:
struct blkcg_gq * blkg_tryget_closest (struct bio *bio , struct
cgroup_subsys_state *css );
π§Έ ARGUMENTS π§Έ
bioβ the target bio, aka the bio we're aiming at π―cssβ the target css, simple as that β¨
π« DESCRIPTION π«
So the failure mode here is that we walk up the blkg tree, and because of that, this makes sure the blkg->parent pointers are always valid. No stale-parent nonsense, periodt π«Ά
It returns the blkg it ended up taking a reference on β or NULL if no reference was taken. That's the whole deal, bestie π
π SEE ALSO π
Kernel file: ./block/blk-cgroup.c β and here's the whole squad, every single one, no skips:
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_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)bio_associate_blkg_from_css(9)bio_associate_blkg(9)bio_clone_blkg_association(9)
mwah π that's the page, bestie! It comes from source/version ./block, dated October 2026, and it's all about blkg_tryget_closest(9). slay and goodbye π«Άβ¨
π¦ 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