STRUCT BLK_ZONE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 β€” peep enum blk_zone_type for the possible values 🏷️
  • cond β€” peep enum blk_zone_cond for 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