---
name: "libnvmf_context_set_reconnect_policy-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_reconnect_policy-libnvme3"
---

# libnvmf\_context\_set\_reconnect\_policy-libnvme3(2)

Set reconnect policy for context

## NAME

libnvmf\_context\_set\_reconnect\_policy - Set reconnect policy for context

## SYNOPSIS

**int libnvmf\_context\_set\_reconnect\_policy** **(struct libnvmf\_context \*fctx** *,* **int ctrl\_loss\_tmo** *,* **int reconnect\_delay** *,* **int fast\_io\_fail\_tmo** *);*

## ARGUMENTS

- fctx

  Fabrics context

- ctrl\_loss\_tmo

  Controller loss timeout in seconds; negative means retry indefinitely

- reconnect\_delay

  Delay between reconnect attempts in seconds

- fast\_io\_fail\_tmo

  Fast I/O fail timeout in seconds; negative disables it; must not exceed *ctrl\_loss\_tmo*

## DESCRIPTION

Convenience setter for the three coupled reconnect policy parameters. *ctrl\_loss\_tmo* and *reconnect\_delay* are coupled: the kernel derives the maximum reconnect attempt count from their ratio. *fast\_io\_fail\_tmo* controls how quickly outstanding I/O is failed while reconnection is in progress.

Individual **libnvmf\_context\_set\_ctrl\_loss\_tmo**, **\_set\_reconnect\_delay**, and **\_set\_fast\_io\_fail\_tmo** accessors are also available when only a subset needs to change.

## RETURN

0 on success, negative error code otherwise.
