STRUCT BLK_ZONE_REPORT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct blk_zone_report(9) ✨

okay so bestie, we're in the Kernel API Manual today and this is genuinely one of those pages you're gonna be glad you read πŸ’…


🌸 NAME 🌸

struct blk_zone_report β€” the BLKREPORTZONE ioctl request and reply, like one little struct doing double duty 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

struct blk_zone_report {
    __u64 sector;
    __u32 nr_zones;
    __u32 flags;
    struct blk_zone zones[];
};

look at her. iconic. no notes ✨


πŸŽ€ Members πŸŽ€

  • sector β€” the starting sector of the report. that's where the story begins, periodt πŸ“
  • nr_zones β€” IN it's the maximum, OUT it's the actual. yes she switches it up depending on which way the data's flowing, main character energy fr πŸ’«
  • flags β€” one or more flags, as defined by enum blk_zone_report_flags. now listen closely because this part matters: with BLKREPORTZONE, this field is ignored as an input and is valid only as an output. but with BLKREPORTZONEV2, this field is used as both input and output. two different vibes, same field, iykyk 😭
  • zones β€” space to hold nr_zones zones entries on reply. it's literally the whole point, she's holding the payload πŸ“

πŸ’– Description πŸ’–

the array of at most nr_zones must follow this structure in memory. not "should", not "ideally", must β€” that's the layout, don't fight it πŸ’€


⭐ SEE ALSO ⭐

  • Kernel file ./include/uapi/linux/blkzoned.h β€” that's where she lives 🏠
  • enum blk_zone_type(9)
  • enum blk_zone_cond(9)
  • enum blk_zone_report_flags(9)
  • struct blk_zone(9)
  • struct blk_zone_range(9)

the whole friend group fr, go read them too 🌈


ngl the structure layout is not a suggestion bestie, respect the memory order or the kernel will simply Not Be Having It πŸ™ˆ

okay that's the page!! this one came from ./include/uapi/linux, dated October 2026 β€” mwah, love that for us, catch you in the next manpage πŸ’œπŸ§š

πŸ“¦ where this page comes from