libnvme(9)

🌸 NAME 🌸

okay bestie, so this is struct nvme_format_nvm_args β€” literally the arguments bundle for the Format Nvme Namespace command. it's from the libnvme API Manual, and no cap, it's the lil packet of vibes you hand over when you want a namespace formatted. πŸ’–


✨ SYNOPSIS ✨

struct nvme_format_nvm_args {
    __u32 *result;
    int args_size;
    int fd;
    __u32 timeout;
    __u32 nsid;
    enum nvme_cmd_format_mset mset;
    enum nvme_cmd_format_pi pi;
    enum nvme_cmd_format_pil pil;
    enum nvme_cmd_format_ses ses;
    __u8 lbaf;
    __u8 rsvd1[7];
    __u8 lbafu;
 };

πŸ’… Members πŸ’…

like, every single field, in order, bestie. don't skip a single one, i would never πŸ™ˆ

  • result β€” the command completion result, straight out of CQE dword0. the receipts, basically. 🧾
  • args_size β€” size of struct nvme_format_nvm_args. it knows its own measurements, iconic.
  • fd β€” file descriptor of the nvme device. your main character connection to the drive. πŸ”Œ
  • timeout β€” set this to override the default timeout to this value in milliseconds; super useful for long running formats. and if you set it to 0, it'll use the system default. periodt.
  • nsid β€” namespace ID to format. which one we're doing, specifically.
  • mset β€” metadata settings (extended or separated). true if extended. πŸ’«
  • pi β€” protection information type.
  • pil β€” protection information location (beginning or end). true if end.
  • ses β€” secure erase settings. πŸ”₯
  • lbaf β€” logical block address format, least significant 4 bits. the little bits. tiny. precious. πŸŽ€
  • rsvd1 β€” Reserved. not for us. hands off, bestie. 🚫
  • lbafu β€” logical block address format, most significant 2 bits. the rest of the vibe.
ok so real talk: this is a format command, and formatting a namespace is not a casual lil thing. that timeout field existing specifically for "long running formats" should tell you everything. 🫢

πŸ’– that's the whole page, bestie πŸ’–

this was pulled from the libnvme API Manual, and the version we're serving is dated August 2026. slay, bye, go format responsibly βœ¨πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from