blk_zone_plug_bio(9)
π blk_zone_plug_bio(9) β from the Kernel API Manual, bestie π
okay so picture this: you're deep in the kernel API manual, section 9, and you've stumbled onto blk_zone_plug_bio. no cap, this one's a little niche but it's lowkey iconic once you get it. let's get into it β¨
πΈ NAME πΈ
blk_zone_plug_bio β handle a zone write BIO with zone write plugging π«Ά
like, it takes a BIO and does the zone-write-plugging thing with it. that's the whole vibe check.
β¨ SYNOPSIS β¨
bool blk_zone_plug_bio(struct bio *bio, unsigned int nr_segs);
it returns a bool, it takes a struct bio * and an unsigned int, and honestly? she's serving function signature π
π¦ ARGUMENTS π¦
bioβ the BIO being submitted. the main character, fr fr. everything happens to her.nr_segsβ the number of physical segments ofbio. literally just a count, but she matters π
π₯ DESCRIPTION π₯
okay so here's what's actually going down: this function handles write, write zeroes and zone append operations requiring emulation using zone write plugging. that's the whole assignment. no more, no less π
and the return value? pay attention, because this is the part where people get caught out π
- return
truewheneverbioexecution needs to be delayed through the zone write plug. like, the plug says "not yet bestie, wait your turn" π - otherwise, return
falseto let the submission path processbionormally. she's free, she's unbothered, she goes straight through π
so like,true= delayed by the plug,false= business as usual. keep that straight and you're golden β¨
π SEE ALSO π
kernel file: ./block/blk-zoned.c β go read her, she's the source π§
and the whole friend group:
blk_zone_cond_str(9)bdev_zone_is_seq(9)blkdev_report_zones(9)blkdev_zone_mgmt(9)disk_report_zone(9)blkdev_get_zone_info(9)blkdev_report_zones_cached(9)blk_revalidate_disk_zones(9)blk_zone_issue_zeroout(9)
they all ate, honestly π
and that's the page!! mwah π this little gem lives in the ./block source, dated October 2026, and it's filed under the Kernel API Manual. go forth and plug those zones, bestie β you've got this, periodt ππ
β¨
π¦ 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