libnvmf\_context\_set\_reconnect\_policy(9) libnvme API manual libnvmf\_context\_set\_reconnect\_policy(9)

# [NAME](#NAME)

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

# [SYNOPSIS](#SYNOPSIS)

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

# [ARGUMENTS](#ARGUMENTS)

[fctx](#fctx)

Fabrics context

[ctrl\_loss\_tmo](#ctrl_loss_tmo)

Controller loss timeout in seconds; negative means retry indefinitely

[reconnect\_delay](#reconnect_delay)

Delay between reconnect attempts in seconds

[fast\_io\_fail\_tmo](#fast_io_fail_tmo)

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

# [DESCRIPTION](#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](#RETURN)

0 on success, negative error code otherwise.

libnvmf\_context\_set\_reconnect\_policy September 2026

---

Document: libnvmf_context_set_reconnect_policy-libnvme3(2) from nvme-cli 3.1-r0 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
