blk_zone_issue_zeroout(9)
πΈ blk_zone_issue_zeroout π
okay so bestie, welcome to the Kernel API Manual β today's main character is blk_zone_issue_zeroout(9) and honestly? she's iconic. quick vibe check before we dive in: this page lives in the <purple>./block</purple> corner of the kernel, so you already know it's zoned-storage core, fr fr.
β¨ NAME β¨
blk_zone_issue_zeroout β zero-fill a block range in a zone π
no cap, that's literally the whole job. she zero-fills. in a zone. slay.
π¦ SYNOPSIS π¦
int blk_zone_issue_zeroout (struct block_device *bdev , sector_t sector
, sector_t nr_sects , gfp_t gfp_mask );
look at her. four params, returns an int, zero notes. she's giving lowkey minimalist. π«Ά
π ARGUMENTS π
okay so let's meet the cast, one by one, because every single one of them matters:
bdevβ the blockdev you're writing to π this is the one getting the love.sectorβ the start sector. where the party begins.nr_sectsβ number of sectors to write. how long the party runs.gfp_maskβ memory allocation flags (forbio_alloc) β literally the flags that get passed tobio_alloc, so set them right, ok? π
π₯ DESCRIPTION π₯
So the whole thing: this bad girl zero-fills a block range in a zone β¨ β and here's the rule, bestie, listen up: sector must be equal to the zone write pointer. not "should be", not "ideally", must. that's the assignment and she will not be negotiating. π
She also handles potential errors due to the (initially unknown) lack of hardware offload β iykyk, sometimes the hardware just doesn't want to help and you don't find out until it's too late. If you wanna read the full lore on that, see blkdev_issue_zeroout.
π reminder: sector β zone write pointer = you're not getting what you asked for. respect the write pointer, periodt.
π SEE ALSO π
The girls she links arms with, all of them, no skips:
- Kernel file
<lavender>./block/blk-zoned.c</lavender>β the source, the birthplace, the origin story π§ 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_zone_plug_bio(9)blk_revalidate_disk_zones(9)
go read all of them. yes, all. that's the group chat and you're in it now. π«Άβ¨
okay that's the page!! π this one comes to you from the <mint>./block</mint> section, dated <peach>October 2026</peach>, title blk_zone_issue_zeroout(9) β and that's the whole manual, no notes, 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