blk_cgroup_mergeable(9)
π blk_cgroup_mergeable(9) β the kernel API manual, but make it make sense π
okay so bestie, you know how the kernel has to decide whether two IOs are allowed to get merged together? yeah. this is literally that function. it lives in the <pink>kernel API manual</pink> (that's the manual name, iykyk π«Ά) and it's a little bool-returning queen with big main character energy.
β¨ NAME β¨
blk_cgroup_mergeable β determine whether to allow or disallow merges π
πΈ SYNOPSIS πΈ
bool blk_cgroup_mergeable (struct request *rq , struct bio *bio );
that's it. that's the whole signature. two pointers and a bool at the end, periodt. β
π¦ ARGUMENTS π¦
rqβ the request you wanna merge into. like, the destination. the host. the main character of the merge πbioβ the bio you wanna merge. the little incoming guest π
π§ DESCRIPTION π§
so here's the vibe check: bio and rq should belong to the same cgroup β like, same friend group or it's not happening, ngl. and their issue_as_root should match too, fr fr. π₯
why tho? because β and this is the important part π β we don't want to throttle e.g. a metadata update just because it happens to be sitting right next to a regular IO. imagine getting held back for the crime of standing near someone π not on our watch.
π SEE ALSO π
the kernel file ./block/blk-cgroup.h is the spot, and these besties are all in the group chat too π:
bio_issue_as_root_blkg(9)blkg_lookup(9)blkg_to_pd(9)pd_to_blkg(9)blkg_get(9)blkg_tryget(9)blkg_put(9)blkg_for_each_descendant_pre(9)blkg_for_each_descendant_post(9)blkcg_set_delay(9)blkcg_clear_delay(9)
okay and finally, the cute little sign-off π«Ά β this page is from ./block, dated October 2026, and it's filed under blk_cgroup_mergeable(9) in the kernel API manual. slay, go merge responsibly, 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