---
name: "libnvmf_context_set_persistent-libnvme3"
section: "2"
platform: "linux"
package: "nvme-cli"
version: "3.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libnvmf_context_set_persistent-libnvme3"
---

# libnvmf\_context\_set\_persistent-libnvme3(2)

Set the discovery controller persistence mode

## NAME

libnvmf\_context\_set\_persistent - Set the discovery controller persistence mode

## SYNOPSIS

**int libnvmf\_context\_set\_persistent** **(struct libnvmf\_context \*fctx** *,* **const char \*persistent** *);*

## ARGUMENTS

- fctx

  Fabrics context

- persistent

  One of "no", "auto", "force" (case-insensitive)

## DESCRIPTION

"auto" persists a Discovery Log Page entry's connection only where that entry's own EPCSD flag (see *enum nvmf\_disc\_eflags*) reports support for it; "force" persists regardless of what EPCSD reports; "no" never persists.

## RETURN

0 on success, -EINVAL if *fctx* is NULL or *persistent* matches none of the accepted values.
