libnvme(9)
π libnvme(9) β the API Manual, bestie edition π
okay so this is a page from the libnvme API manual (section 9, kernel/API vibes) and it's literally all about one struct. yes. one. struct. and honestly? she's iconic.
β¨ NAME β¨
struct nvme_resv_status β the Reservation Status Data Structure π
like, it's the data structure that holds your reservation status. that's the whole gig. no cap.
πΈ SYNOPSIS πΈ
here's the shape of her, exactly as written, do not touch, do not "fix", she's perfect:
struct nvme_resv_status {
__le32 gen;
__u8 rtype;
__u8 regstrnt[2];
__u8 rsvd7[2];
__u8 ptpls;
__u8 rsvd10[14];
union {
struct {
__u8 rsvd24[40];
struct nvme_registrant_ext registrant_eds[0];
};
struct nvme_registrant registrant_ds[0];
};
};
no i will not be normal about the anonymous union. it's giving nesting doll energy πͺ
π Members π
okay bestie, field by field, let's go. every single one. line up. π
genβ the Generation. she's a__le32. that's little-endian, iykyk.rtypeβ the Reservation Type. a__u8. tells you what kind of reservation we're dealing with.regstrntβ Number of Registrants. a__u8[2]array, so two bytes of registrant-counting realness.rsvd7β Reserved. a__u8[2]. don't touch, she's padding, she's resting.ptplsβ Persist Through Power Loss State. a__u8. yes it's spelled "Persist Through Power Loss". yes the power loss is real. πrsvd10β Reserved. a__u8[14]. fourteen whole bytes of "nothing to see here". queen of minding her own business.{unnamed_union}β anonymous. that's literally all it says. unnamed. no name. main character with no name tag π«Ά{unnamed_struct}β anonymous. again. nesting inside the anonymous union. it's anonymous-ception fr fr.rsvd24β Reserved. a__u8[40]. forty bytes. forty. reserved. we love a spacious icon.registrant_edsβ Registrant Extended Data Structure. typestruct nvme_registrant_ext, declared asregistrant_eds[0]β a flexible array member, zero length, lives inside the anonymous struct. the extended one. πregistrant_dsβ Registrant Data Structure. typestruct nvme_registrant, declared asregistrant_ds[0]β the other flexible array member, this one directly in the anonymous union. the non-extended one. β
lowkey important: those two[0]array members live in different branches of the union, and both branch wrappers are anonymous β that's what the two{unnamed_union}/{unnamed_struct}entries mean. do not go renaming them, they're anonymous on purpose π
π¦ vibe check π¦
so to recap the whole lore: gen, rtype, regstrnt, rsvd7, ptpls, rsvd10, then an anonymous union of an anonymous struct (rsvd24, registrant_eds) and registrant_ds. that's it. that's the struct. and she ate. π₯
π that's the whole page, bestie! this little love letter came from the libnvme API manual, dated October 2026, and it's documenting struct nvme_resv_status β same title, same manual, same date, all the vibes and all the facts intact. mwah πβ¨
π¦ 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