libnvme(2)

🌸 NAME 🌸

okay so bestie, welcome to the libnvme(2) API manual ✨ and today's main character is:

struct nvme_uring_cmd β€” the nvme uring command structure πŸ’… no cap, that's literally its whole job description.


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole thing, character for character, don't touch a single semicolon or she WILL bite:

struct nvme_uring_cmd {
    __u8 opcode;
    __u8 flags;
    __u16 rsvd1;
    __u32 nsid;
    __u32 cdw2;
    __u32 cdw3;
    __u64 metadata;
    __u64 addr;
    __u32 metadata_len;
    __u32 data_len;
    __u32 cdw10;
    __u32 cdw11;
    __u32 cdw12;
    __u32 cdw13;
    __u32 cdw14;
    __u32 cdw15;
    __u32 timeout_ms;
    __u32 rsvd2;
 };

look at her πŸ₯Ή so organized. so struct-shaped.


πŸŽ€ Members πŸŽ€

one by one, the full roster, nobody gets left out:

  • opcode β€” the Operation code, bestie. go check enum nvme_io_opcodes and enum nvme_admin_opcodes if you wanna know your options πŸ‘€
  • flags β€” not supported πŸ™ˆ it was intended for command flags (eg: SGL, FUSE) but it's just sitting there, decorative, unserious.
  • rsvd1 β€” Reserved for future use ✨ (manifesting that future, tbh)
  • nsid β€” Namespace Identifier, or the Fabrics type. two jobs, one field, she's versatile πŸ’…
  • cdw2 β€” Command Dword 2 (no spec defined use). she's free-spirited. ungoverned.
  • cdw3 β€” Command Dword 3 (no spec defined use). same vibe, different dword πŸ’€
  • metadata β€” User space address to metadata buffer (NULL if not used). no thoughts, just address 🫢
  • addr β€” User space address to data buffer (NULL if not used). the data one this time, not the metadata one, don't get it twisted ⭐
  • metadata_len β€” Metadata buffer transfer length. how much metadata we talkin' πŸ“
  • data_len β€” Data buffer transfer length. how much data we talkin' πŸ“βœ¨
  • cdw10 β€” Command Dword 10 (command specific) πŸ”₯
  • cdw11 β€” Command Dword 11 (command specific) πŸ”₯
  • cdw12 β€” Command Dword 12 (command specific) πŸ”₯
  • cdw13 β€” Command Dword 13 (command specific) πŸ”₯
  • cdw14 β€” Command Dword 14 (command specific) πŸ”₯
  • cdw15 β€” Command Dword 15 (command specific) πŸ”₯ the whole dword squad. iconic lineup, truly.
  • timeout_ms β€” If non-zero, overrides system default timeout in milliseconds ⏰ yes bestie, you can just. overrule the system. when you set it. when it's non-zero. slay.
  • rsvd2 β€” Reserved for future use (and fills an implicit struct pad
and yeah, that last one literally just. cuts off there in the source 🧚 i am not finishing that sentence for you, i refuse, that's not my business, i don't make the rules πŸ’€ she said "(and fills an implicit struct pad" and then simply stopped speaking. queen behavior honestly.

and that's the whole page, bestie!! πŸ’– this was struct nvme_uring_cmd, brought to you by the libnvme(2) API manual, dated July 2026 🌈 go forth and uring, and remember: reserved fields are reserved for a reason, no touching πŸ™…β€β™€οΈ periodt πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from