__blkdev_issue_zeroout(9)
π __blkdev_issue_zeroout(9) π
okay bestie, welcome to the Kernel API Manual β¨ β this is the page for __blkdev_issue_zeroout, and yes it's a double-underscore icon, we respect her π
πΈ NAME πΈ
__blkdev_issue_zeroout β generate number of zero filled write bios π like, it makes a whole bunch of zero-write bios for you, no cap
β¨ SYNOPSIS β¨
int __blkdev_issue_zeroout (struct block_device *bdev , sector_t sector
, sector_t nr_sects , gfp_t gfp_mask , struct bio **biop , unsigned
flags );
that's the whole signature, copied exactly, don't @ me π«Ά
π¦ ARGUMENTS π¦
bdevβ the blockdev to issue π« it's astruct block_device *, she's the main character heresectorβ start sector πΈ where the zeroing begins, bestienr_sectsβ number of sectors to write β count 'emgfp_maskβ memory allocation flags (forbio_alloc) π iykykbiopβ pointer to anchor bio π it's astruct bio **, so, a pointer to a pointer, stay with meflagsβ controls detailed behavior π₯ the little switches that change the vibe check
π DESCRIPTION π
so what does she actually do? Zero-fill a block range, either using hardware offload or by explicitly writing zeroes to the device. literally both paths lead to zeroes, she just picks how π
now, the caveats β pay attention, this is the important part π
- If a device is using logical block provisioning, the underlying space will not be released if
flagscontainsBLKDEV_ZERO_NOUNMAP. so like, the space stays taken, fr fr - If
flagscontainsBLKDEV_ZERO_NOFALLBACK, the function will return-EOPNOTSUPPif no explicit hardware offload for zeroing is provided. so if there's no offload, she just β¨ gives up β¨ and hands you back-EOPNOTSUPP
bestie pls note: those two flags are the whole personality of this function, don't mix them up π«Ά
π SEE ALSO π
- Kernel file
./block/blk-lib.cπ that's where the source lives, go look blkdev_issue_discard(9)blkdev_issue_zeroout(9)
all three, listed, exactly, periodt π
and that's the page!! π§ mwah π
sign-off: this whole thing came from ./block, dated October 2026 β Kernel API Manual energy only. stay slay, stay zeroed β¨π
π¦ 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