LIBNVMF_CONTEXT_SET_PERSISTENT-LIBNVME3(2)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvmf_context_set_persistent β€” from the libnvme API manual ✨

Okay bestie, grab a strawberry drink πŸ“ because we're diving into the libnvme API manual and this one function is lowkey iconic: libnvmf_context_set_persistent. It sets the discovery controller persistence mode, and yes, that's exactly as much of a mouthful as it sounds 🫢


🌸 NAME 🌸

libnvmf_context_set_persistent β€” set the discovery controller persistence mode πŸ’«


πŸŽ€ SYNOPSIS πŸŽ€

int libnvmf_context_set_persistent (struct libnvmf_context *fctx , const
       char *persistent );

Like, that's the whole signature. Two args, one int back. No cap. 😌


πŸ¦‹ ARGUMENTS πŸ¦‹

  • fctx β€” the Fabrics context, aka the main character of this whole situation πŸ‘‘
  • persistent β€” one of "no", "auto", "force", and it's case-insensitive so don't stress about your caps lock fr fr πŸ’…

✨ DESCRIPTION ✨

Okay so here's the vibe check on the three modes:

  • "auto" β€” persists a Discovery Log Page entry's connection only where that entry's own EPCSD flag (peep enum nvmf_disc_eflags) reports support for it. So it's polite, it asks first πŸŽ€
  • "force" β€” persists regardless of what EPCSD reports. It does not ask. It does not care. Main character energy πŸ”₯
  • "no" β€” never persists. Periodt. πŸ’€

🌈 RETURN 🌈

  • 0 on success β€” slay πŸ’–
  • -EINVAL if fctx is NULL, or if persistent matches none of the accepted values β€” like, it checked and none of "no", "auto", "force" were giving 😭
Heads up bestie: only those three strings (case-insensitive!) are valid. Anything else and you get -EINVAL, no exceptions πŸ™ˆ

And that's the whole page, you ate that πŸ“ Signing off from the libnvme API manual, October 2026 edition β€” libnvmf_context_set_persistent(9), iykyk πŸ’œπŸ§š

πŸ“¦ where this page comes from