libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvme(9) β€” enum nvme_zns_zs

okay bestie, welcome to the libnvme(9) API Manual, and specifically to one very specific little enum: enum nvme_zns_zs. it's the Zone Descriptor Data Structure β€” Zone State Attributes situation. sounds scary, is actually just "what is this zone doing rn" energy. let's get into it ✨


🌸 NAME 🌸

enum nvme_zns_zs β€” Zone Descriptor Data Structure - Zone State Attributes

like, it's an enum. it's about zones. it's about their state (their ~vibe~, if you will). no cap. πŸ¦‹


✨ SYNOPSIS ✨

here's the whole thing laid out, literally verbatim, do not touch:

enum nvme_zns_zs {
    NVME_ZNS_DESC_ZS_SHIFT ,
    NVME_ZNS_DESC_ZS_MASK ,
    NVME_ZNS_ZS_EMPTY ,
    NVME_ZNS_ZS_IMPL_OPEN ,
    NVME_ZNS_ZS_EXPL_OPEN ,
    NVME_ZNS_ZS_CLOSED ,
    NVME_ZNS_ZS_READ_ONLY ,
    NVME_ZNS_ZS_FULL ,
    NVME_ZNS_ZS_OFFLINE

};

that's the whole roster. nine little members. iconic behavior honestly. πŸ‘‘


πŸŽ€ Constants πŸŽ€

okay this is the part where each one gets its moment. main character energy for every single constant, as they deserve. πŸ’–

  • NVME_ZNS_DESC_ZS_SHIFT β€” this one is the shift amount ✨ it's how you get the Zone State (ZS) out of the struct nvme_zns_desc.zs field. shift, like shift the bits, not shift like "omg shift." iykyk.
  • NVME_ZNS_DESC_ZS_MASK β€” the mask πŸ’… you use it to get ZS out of that same struct nvme_zns_desc.zs field. mask + shift = the classic duo, fr fr.
  • NVME_ZNS_ZS_EMPTY β€” Empty state. the zone has nothing going on. it's giving blank slate. 🫢
  • NVME_ZNS_ZS_IMPL_OPEN β€” Implicitly open state. open, but like… implicitly. it didn't announce it. πŸ™ˆ
  • NVME_ZNS_ZS_EXPL_OPEN β€” Explicitly open state. open, and it said so. loud and proud. πŸ“£
  • NVME_ZNS_ZS_CLOSED β€” Closed state. the door is shut. we are not taking visitors rn. πŸšͺ
  • NVME_ZNS_ZS_READ_ONLY β€” Read only state. look, don't touch. admire from a respectful distance. πŸ’œ
  • NVME_ZNS_ZS_FULL β€” Full state. no room. ate and left no crumbs. πŸ”₯
  • NVME_ZNS_ZS_OFFLINE β€” Offline state. gone. unreachable. do not perceive it. πŸ’€

lowkey reminder bestie: these descriptions are literally what's in the manual, so don't go inventing extra meanings for IMPL_OPEN vs EXPL_OPEN beyond "implicitly" and "explicitly" β€” the manpage keeps it mysterious and so do we. 🌈

k so that's the whole page! nine constants, two helper thingies (SHIFT and MASK) for reading ZS out of struct nvme_zns_desc.zs, and seven actual zone states from EMPTY all the way to OFFLINE. you got this, bestie. go read some zone descriptors. 🧚

β€” cute little sign-off: this page came from the enum nvme_zns_zs section of the libnvme API Manual, dated October 2026. mwah. πŸ’‹πŸŽ€

πŸ“¦ where this page comes from