---
name: "libnvme_transport_handle_set_decide_retry-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/libnvme_transport_handle_set_decide_retry-libnvme3"
---

# libnvme\_transport\_handle\_set\_decide\_retry-libnvme3(2)

Install a retry-decision callback

## NAME

libnvme\_transport\_handle\_set\_decide\_retry - Install a retry-decision callback

## SYNOPSIS

**void libnvme\_transport\_handle\_set\_decide\_retry** **(struct libnvme\_transport\_handle \*hdl** *,* **bool (\*decide\_retry)(struct libnvme\_transport\_handle \*hdl, struct libnvme\_passthru\_cmd \*cmd, int err)** *);*

## ARGUMENTS

- hdl

  Transport handle to configure

- decide\_retry

  Callback used to determine whether a passthrough command should be retried after an error. The function is called with the command that failed and the error code returned by the kernel or device. The callback should return true if the submission path should retry the command, or false if the error is final.

## DESCRIPTION

Installs a user-provided callback to control retry behavior for passthrough commands issued through *hdl*. This allows transports or higher-level logic to implement custom retry policies, such as retrying on transient conditions like -EAGAIN or device-specific status codes.

Passing NULL clears any previously installed callback and reverts to the default behavior (no retries).

## RETURN

None.
