STRUCT BLK_ZONE(9)
β¨ NAME β¨
struct blk_zone β the zone descriptor for the BLKREPORTZONE ioctl π
So this is a page from the Kernel API Manual, bestie, and it's basically the receipts for one single zone out of a zoned block device. Iconic little struct. Let's get into it π«Ά
πΈ SYNOPSIS πΈ
struct blk_zone {
__u64 start;
__u64 len;
__u64 wp;
__u8 type;
__u8 cond;
__u8 non_seq;
__u8 reset;
__u8 resv[4];
__u64 capacity;
__u8 reserved[24];
};
No cap, that's the whole thing. Every field, every byte accounted for. π
π Members π
startβ where the zone starts, measured in 512 B sector units πlenβ how long the zone is, also in 512 B sector units πwpβ the zone's write pointer location, in 512 B sector units βοΈtypeβ peepenum blk_zone_typefor the possible values π·οΈcondβ peepenum blk_zone_condfor the possible values πnon_seqβ flag that says the zone is using non-sequential resources (this one's for host-aware zoned block devices ONLY, iykyk) π©resetβ flag that says a zone reset is recommended πresvβ padding for 8B alignment π§½capacityβ the zone's usable capacity, in 512 B sector units πͺreservedβ padding to 64 B so it matches the ZBC, ZAC and ZNS defined zone descriptor size π¦
π¦ Description π¦
Okay so real talk: start, len, capacity and wp all use the regular 512 B sector unit, no matter what the device's logical block size is. Periodt. Don't let the block size gaslight you π
And the overall structure size is 64 B, which matches the ZBC, ZAC and ZNS defined zone descriptor and lets them support future additional zone information later. It's giving future-proofing, lowkey iconic π
π SEE ALSO π
Kernel file ./include/uapi/linux/blkzoned.h and its besties: enum blk_zone_type(9), enum blk_zone_cond(9), enum blk_zone_report_flags(9), struct blk_zone_report(9), struct blk_zone_range(9) β¨
And that's the whole vibe check, bestie π§ This one's living in ./include/uapi/linux, dated October 2026, and yes β it's struct blk_zone(9) till the end ππ Slay responsibly π
π¦ 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