libnvme(9)

🌸 libnvme β€” the struct nvme_set_features_args page πŸ’–

okay bestie, so this is a page out of the libnvme API manual (that's the libnvme(9) section, for the record πŸ‘‘). It's not a command you type, it's a struct β€” like, the lil bundle of vibes you hand to the NVMe Admin Set Feature command so it knows what you actually want. Let's get into it 🫢


✨ NAME ✨

struct nvme_set_features_args β€” the arguments for the NVMe Admin Set Feature command πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct nvme_set_features_args {
    __u32 *result;
    void *data;
    int args_size;
    int fd;
    __u32 timeout;
    __u32 nsid;
    __u32 cdw11;
    __u32 cdw12;
    __u32 cdw13;
    __u32 cdw15;
    __u32 data_len;
    bool save;
    __u8 uuidx;
    __u8 fid;
 };
no cap, that's the whole shape of it β€” copy it exactly, don't get cute with the field names 😀

πŸ’« Members πŸ’«

okay so here's the ✨cast of characters✨ in this struct, one by one, no skipping, we respect every single field in this house πŸŽ€

  • result β€” the command completion result, straight from CQE dword0 ⭐ that's where the answer comes back to you.
  • data β€” the user address of the feature data, if applicable πŸ¦‹ like, only if this feature actually has data to point at.
  • args_size β€” the size of struct nvme_set_features_args πŸ“ yes bestie, the struct knows its own size, iconic behaviour.
  • fd β€” the file descriptor of the nvme device πŸ”₯ that's your lil handle to the actual drive.
  • timeout β€” the timeout, in ms ⏳ measured in milliseconds, so be precise.
  • nsid β€” the namespace ID, if applicable πŸ’œ only relevant when a namespace is actually in the picture.
  • cdw11 β€” the value to set the feature to πŸ‘‘ this is the main character of the whole operation, fr fr.
  • cdw12 β€” the feature specific command dword12 field 🌈 what goes here depends on the feature, so iykyk.
  • cdw13 β€” the feature specific command dword13 field 🌸 again, feature specific, so check your feature's docs.
  • cdw15 β€” the feature specific command dword15 field πŸ“ yes, dword15 β€” there's no dword14 in the list, don't come for me, that's literally just what the struct says 😭
  • data_len β€” the length of the feature data, if applicable, in bytes πŸ“ bytes!! not vibes!!
  • save β€” save the value across power states πŸ”Œ so it survives a power cycle, slay.
  • uuidx β€” the UUID Index, for differentiating vendor specific encoding 🧚 that's the lil disambiguator when vendors do their own thing.
  • fid β€” the feature identifier πŸ’… which feature you're setting, periodt.
heads up bestie: a bunch of these say "if applicable" and "feature specific" for a reason β€” what you actually fill in depends on which feature you're setting. the struct doesn't guess for you πŸ™ˆ

and that's the whole page, no crumbs left πŸ’– stay hydrated, close your file descriptors, and may your CQE dword0 always say what you hoped 🫢

this was the libnvme API manual, libnvme(9) section β€” page for struct nvme_set_features_args, dated August 2026 ✨ bye bestie, go set some features 🌟

πŸ“¦ where this page comes from