blk_cgroup_mergeable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ’œ:


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