libnvme(2)

๐Ÿ’– NAME ๐Ÿ’–

struct nvme_ns_id_desc โ€” the Namespace Identifier Type descriptor, bestie. It's the glow-up little struct that tells you what kind of namespace ID you're looking at and how long it is. She's giving "ID card but make it NVMe" ๐Ÿชชโœจ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

struct nvme_ns_id_desc {
    __u8 nidt;
    __u8 nidl;
    __le16 rsvd;
    __u8 nid[];
};

okay so it's a tiny header followed by a flexible array and honestly? iconic. periodt ๐Ÿ’…


๐ŸŽ€ Members ๐ŸŽ€

  • nidt โ€” Namespace Identifier Type. Which flavor of identifier are we in?? go check enum nvme_ns_id_desc_nidt for the menu of options, she has the full list ๐Ÿ‘‘
  • nidl โ€” Namespace Identifier Length. This is how many bytes long struct nvme_id_ns.nid is. count 'em, don't guess ๐Ÿงฎ
  • rsvd โ€” Reserved. literally just sitting there. do not perceive her. do not touch her. she's resting ๐Ÿ™ˆ
  • nid โ€” Namespace Identifier. This holds a value that is globally unique and gets assigned to the namespace right when the namespace is created โ€” like a name tag you get at birth but for storage ๐Ÿผโœจ The length is defined in struct nvme_id_ns.nidl, so no, you don't get to decide it yourself, that's not your main character moment.

๐Ÿซถ bestie reminder: nidl tells you the length, and struct nvme_id_ns.nidl also tells you the length. yes they're coordinated. no that's not a typo. the struct is just thorough like that.

and that's the whole page, no cap โ€” we out here in the libnvme API Manual, that's the manual name, folder her in right up top like a lil sticker ๐ŸŽ€ this page is struct nvme_ns_id_desc's very own, versioned with libnvme(2), and it was dated July 2026 so she's fresh fr fr. mwah, bye ๐Ÿ’–๐Ÿฆ‹โญ

๐Ÿ“ฆ where this page comes from