libnvme(9)

πŸ’– NAME πŸ’–

struct nvme_resv_register_args β€” the little argument bundle you hand over for the NVMe Reservation Register command πŸŽ€

Okay so bestie, real talk: this is the API manual for libnvme, and this page is all about one struct. One. Single. Struct. And she is important. If you're doing reservation stuff on an NVMe namespace, this is the glow-up container that carries everything the kernel needs. No cap. πŸ’…


✨ SYNOPSIS ✨

struct nvme_resv_register_args {
    __u64 crkey;
    __u64 nrkey;
    __u32 *result;
    int args_size;
    int fd;
    __u32 timeout;
    __u32 nsid;
    enum nvme_resv_rrega rrega;
    enum nvme_resv_cptpl cptpl;
    bool iekey;
 };

Look at her. Ten fields, zero notes, all business. Copy it exactly, don't freestyle it. πŸ™ˆ


🌸 Members 🌸

  • crkey β€” the current reservation key that's associated with the host. Like, the key you already have. The one you walked in with. πŸ”‘
  • nrkey β€” the new reservation key that gets registered, but only if the action is register or replace. So if rrega isn't doing one of those two things, this field is just sitting there, gorgeous and unemployed. πŸ’…
  • result β€” the command completion result straight out of CQE dword0. That's where the kernel drops the tea back to you. πŸ«–
  • args_size β€” the size of struct nvme_resv_register_args. Yes, she's measuring herself. Self-aware queen. πŸ‘‘
  • fd β€” the file descriptor of the nvme device. Your ticket in. 🎟️
  • timeout β€” the timeout, in ms. Milliseconds. Don't @ me. ⏳
  • nsid β€” the namespace identifier. Which namespace are we talking about, bestie? This one. 🌈
  • rrega β€” the registration action, see enum nvme_resv_rrega. This is the "what are we even doing here" field. 🎯
  • cptpl β€” change persist through power loss, see enum nvme_resv_cptpl. Will your reservation survive the lights going out? That's her department. ⚑
  • iekey β€” set this to ignore the existing key. Just pretend it's not there. Iconic behaviour, honestly. πŸ™ˆ

Heads up bestie: rrega and cptpl are enums, so please go read enum nvme_resv_rrega and enum nvme_resv_cptpl before you start guessing values. I'm not gonna make up numbers for you, that's not the vibe. πŸ’€

And that's the whole page, fr fr. This was the API Manual for libnvme, page libnvme(9), dated August 2026. Stay slay, keep your keys current, and go register some reservations. πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from