blkdev_get_zone_info(9)
β¨ blkdev_get_zone_info β bestie edition β¨
okay so this is a page from the Kernel API Manual (section 9, the kernel-functions aisle π«Ά) and it's all about getting zone info for one specific zone. it's giving "niche but iconic" tbh.
πΈ NAME πΈ
blkdev_get_zone_info β grab a single zone's information out of the cached data π
π¦ SYNOPSIS π¦
int blkdev_get_zone_info (struct block_device *bdev , sector_t sector ,
struct blk_zone *zone );
π ARGUMENTS π
bdevβ the target block device, aka the main character of this whole operation πsectorβ a sector that's contained by the target zone (yes, it just has to live inside it, it doesn't have to be the first one π)zoneβ the zone structure where the zone information gets returned πΈ
β¨ DESCRIPTION β¨
so basically: you're getting the zone information for the zone that contains sector, and the way it does that is with the zone write plug of the target zone β if one exists β or the disk zone condition array otherwise. either way, you're covered, bestie π
real talk though: the zone condition may be reported as being the BLK_ZONE_COND_ACTIVE condition for a zone that is actually in the implicit open, explicit open or closed condition. so don't come for the report, it's just how it vibes π
it returns 0 on success and a negative error code on failure. no cap β¨
π₯ SEE ALSO π₯
kernel file ./block/blk-zoned.c and honestly 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_report_zones_cached(9)blk_zone_plug_bio(9)blk_revalidate_disk_zones(9)blk_zone_issue_zeroout(9)
ngl the "zone condition may be reported as BLK_ZONE_COND_ACTIVE" bit is the one thing to actually remember β it's a real caveat, not a vibe check fail π«Ά
okay that's the whole page, bestie π source is the ./block kernel file, and this lil manual page is dated October 2026 β so mark your calendars and slay the zone management, 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