libnvme(2)

✨ NAME ✨

struct nvme_ns_mgmt_host_sw_specified β€” Namespace management Host Software Specified Fields πŸ’–

okay so bestie, this is a page straight out of the libnvme(2) API manual, and we're about to vibe-check a struct. It's the block of host-software-specified fields you hand over when you're doing namespace management. No cap, it's mostly __u8 rsvd padding with some absolute icons hiding in between. Let's get into it 🫢


🌸 SYNOPSIS 🌸

struct nvme_ns_mgmt_host_sw_specified {
    __le64 nsze;
    __le64 ncap;
    __u8 rsvd16[10];
    __u8 flbas;
    __u8 rsvd27[2];
    __u8 dps;
    __u8 nmic;
    __u8 rsvd31[61];
    __le32 anagrpid;
    __u8 rsvd96[4];
    __le16 nvmsetid;
    __le16 endgid;
    __u8 rsvd104[280];
    __le64 lbstm;
    __le16 nphndls;
    __u8 rsvd394[105];
    union {
      __u8 rsvd499[13];
      struct {
        __u8 znsco;
        __le32 rar;
        __le32 ror;
        __le32 rnumzrwa;
      } zns;
    };
    __le16 phndl[128];
    __u8 rsvd768[3328];
 };

πŸ’… Members πŸ’…

  • nsze β€” Namespace Size. It's the total size of the namespace measured in logical blocks, and the number of logical blocks is based on the formatted LBA size. so like, the LBA size is doing the math here, not us ✨
  • ncap β€” Namespace Capacity. The max number of logical blocks that may be allocated in the namespace at any point in time. Same deal: the count is based on the formatted LBA size.
  • rsvd16 β€” Reserved. πŸ™ˆ nothing to see here bestie
  • flbas β€” Formatted LBA Size, see enum nvme_id_ns_flbas.
  • rsvd27 β€” Reserved.
  • dps β€” End-to-end Data Protection Type Settings, see enum nvme_id_ns_dps.
  • nmic β€” Namespace Multi-path I/O and Namespace Sharing Capabilities, see enum nvme_id_ns_nmic.
  • rsvd31 β€” Reserved.
  • anagrpid β€” ANA Group Identifier. It tells you the ANA Group Identifier of the ANA group that this namespace is a member of. main character namespace energy πŸ‘‘
  • rsvd96 β€” Reserved.
  • nvmsetid β€” NVM Set Identifier. Points at the NVM Set this namespace is associated with.
  • endgid β€” Endurance Group Identifier. Points at the Endurance Group this namespace is associated with.
  • rsvd104 β€” Reserved.
  • lbstm β€” Logical Block Storage Tag Mask. It identifies the mask for the Storage Tag field for the protection information.
  • nphndls β€” Number of Placement Handles. It specifies how many Placement Handles are included in the Placement Handle List.
  • rsvd394 β€” Reserved.
  • {unnamed_union} β€” anonymous. yeah, it's an unnamed union, it's giving mysterious πŸ¦‹
    • rsvd499 β€” Reserved for I/O Command Sets that extend this specification.
    • zns β€” rsvd499 ( Zoned Namespace Command Set specific field ). This one is a nested struct of its own, and its members are:
      • znsco
      • rar (a __le32)
      • ror (a __le32)
      • rnumzrwa (a __le32)
  • phndl β€” Placement Handle Associated RUH. This field specifies the Reclaim Unit Handle Identifier to be associated with the Placement Handle value. ⚠️ Heads up: if the Flexible Data Placement capability is not supported or not enabled in the specified Endurance Group, then the controller shall ignore this field. lowkey important, don't skip it fr fr
  • rsvd768 β€” Reserved.
note bestie: all those rsvd* names are literally the reserved byte-range markers β€” the number is just where they sit in the struct. We keep them exactly as written, no renaming, periodt πŸ’…

that's the whole struct, every single byte accounted for, no notes skipped, no fields merged 🌈 this page came bundled with the libnvme(2) API Manual, struct nvme_ns_mgmt_host_sw_specified edition, dated July 2026 β€” love that for us, stay hydrated and always check your nphndls before you flex your placement handles πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from