libnvme(9)
π libnvme(9) π
okay bestie, welcome to the API Manual for libnvme β section 9, the kernel/API corner of the man-page universe. this one is a tiny little page but it's giving "small but mighty", fr fr. it's all about one struct, and we're gonna go through it line by line. no cap, nothing skipped. π«Ά
β¨ NAME β¨
so the star of the show is struct nvme_underlying_ns_entry β and honestly? the name alone tells you everything. it's the Underlying Namespace Entry Data Structure. that's it. that's the whole vibe. it's the data structure that holds one single entry of underlying namespace info. iconic behavior. π
π SYNOPSIS π
here's the literal shape of it, copy-pasted straight from the source so you can see exactly what we're working with:
struct nvme_underlying_ns_entry {
__u8 unsnqn[NVME_NQN_LENGTH];
__le32 nsid;
__le16 cntlid;
__u8 rsvd58[56];
__le16 idx;
};
look at her. five fields, all typed with those little __u8 / __le32 / __le16 kernel types (that's unsigned 8-bit, little-endian 32-bit, little-endian 16-bit β the usual suspects π
). she's compact, she's padded out with 56 reserved bytes, she's everything. π¦
π Members π
okay so now we go field by field, because every single one of these matters. get comfy, bestie.
unsnqnβ this is a__u8array ofNVME_NQN_LENGTHbytes, and it holds the Underlying NVM Subsystem NQN (UNSNQN). yes, NQN inside UNSNQN. acronyms on acronyms. the way that naming scheme just keeps going π but it's the subsystem NQN for the underlying NVM subsystem, periodt.nsidβ a__le32, and it's the Namespace Identifier (NSID) of the Underlying Namespace. this is the actual "which namespace are we talking about" number. main character energy, honestly. πcntlidβ a__le16, holding the Controller ID (CNTLID) of a controller able to attachnsid. so like, this is the controller that's allowed to attach to that namespace. the plus-one. the one who gets the invite. πrsvd58β a__u8array of56bytes and it is... Reserved. that's literally the whole job. 56 bytes of "nothing to see here", padding it out so the layout lines up. respect the hustle though, even the reserved bytes are doing important work. πidxβ a__le16, and it's the Index (IDX) into the list of reportable Underlying Namespaces. so this tells you where in that list this entry sits. your little bookmark into the underlying-namespace catalogue. π
quick vibe check π§ β notice that idx comes after the chunk of reserved bytes, not before. that's the struct layout as written, and we do not rearrange. we respect the byte order in this house.
π«Ά the cute little sign-off π«Ά
and that's the whole page, bestie!! this beauty comes to you from the libnvme(9) API Manual β a.k.a. struct nvme_underlying_ns_entry in section 9 β dated October 2026. slay, see you in the next man page. π
πΈπ
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms