ENUM BLK_ZONE_COND(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Ok so enum blk_zone_cond β€” straight outta the Kernel API Manual, section 9 β€” is literally the condition [state] of a zone in a zoned device. Bestie, it's the vibe check for zones. πŸ¦‹


✨ SYNOPSIS ✨

enum blk_zone_cond {
    BLK_ZONE_COND_NOT_WP ,
    BLK_ZONE_COND_EMPTY ,
    BLK_ZONE_COND_IMP_OPEN ,
    BLK_ZONE_COND_EXP_OPEN ,
    BLK_ZONE_COND_CLOSED ,
    BLK_ZONE_COND_READONLY ,
    BLK_ZONE_COND_FULL ,
    BLK_ZONE_COND_OFFLINE ,
    BLK_ZONE_COND_ACTIVE

};

πŸŽ€ CONSTANTS πŸŽ€

  • BLK_ZONE_COND_NOT_WP β€” this zone has no write pointer, it is conventional. No write-pointer energy, just conventional. πŸ’…
  • BLK_ZONE_COND_EMPTY β€” the zone is empty. Iconic empty-girl era. πŸŽ€
  • BLK_ZONE_COND_IMP_OPEN β€” the zone is open, but not explicitly opened. Lowkey open, not like officially open.
  • BLK_ZONE_COND_EXP_OPEN β€” the zones was explicitly opened by an OPEN ZONE command. Highkey open, with receipts.
  • BLK_ZONE_COND_CLOSED β€” the zone was [explicitly] closed after writing. It said bye after the writing era. πŸ¦‹
  • BLK_ZONE_COND_READONLY β€” the zone is read-only. Look, don't touch. ✨
  • BLK_ZONE_COND_FULL β€” the zone is marked as full, possibly by a zone FINISH ZONE command. Full plate, no crumbs. πŸ“
  • BLK_ZONE_COND_OFFLINE β€” the zone is offline (sectors cannot be read/written). Absolutely not taking calls. πŸ’€
  • BLK_ZONE_COND_ACTIVE β€” the zone is either implicitly open, explicitly open, or closed. Main character state that covers the whole open/closed crew. πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

The Zone Condition state machine in the ZBC/ZAC standards maps the above definitions as:

  • ZC1: Empty | BLK_ZONE_COND_EMPTY
  • ZC2: Implicit Open | BLK_ZONE_COND_IMP_OPEN
  • ZC3: Explicit Open | BLK_ZONE_COND_EXP_OPEN
  • ZC4: Closed | BLK_ZONE_COND_CLOSED
  • ZC5: Full | BLK_ZONE_COND_FULL
  • ZC6: Read Only | BLK_ZONE_COND_READONLY
  • ZC7: Offline | BLK_ZONE_COND_OFFLINE
🚨 Conditions 0x5 to 0xC are reserved by the current ZBC/ZAC spec and should be considered invalid. Not valid, not cute, do not use, bestie. πŸ™ˆ

The condition BLK_ZONE_COND_ACTIVE is used only with cached zone reports. It is used to report any of the BLK_ZONE_COND_IMP_OPEN, BLK_ZONE_COND_EXP_OPEN and BLK_ZONE_COND_CLOSED conditions. Conversely, a regular zone report will never report a zone condition using BLK_ZONE_COND_ACTIVE and instead use the conditions BLK_ZONE_COND_IMP_OPEN, BLK_ZONE_COND_EXP_OPEN or BLK_ZONE_COND_CLOSED as reported by the device. No cap, that's the whole distinction. πŸ’–


🌈 SEE ALSO 🌈

  • Kernel file ./include/uapi/linux/blkzoned.h β€” enum blk_zone_type(9), enum blk_zone_report_flags(9), struct blk_zone(9), struct blk_zone_report(9), struct blk_zone_range(9).

Big sparkly sign-off from the Kernel API Manual 🫢 β€” source/version: ./include/uapi/linux; date: October 2026; page: enum blk_zone_cond(9). Bye bestie, go check those zones πŸ’…βœ¨

πŸ“¦ where this page comes from