libnvme_transport_handle_set_decide_retry-libnvme3(2)

libnvme_transport_handle_set_decide_retry-libnvme32

Install a retry-decision callback

Usage

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.

Overview

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.

From nvme-cli 3.2-1 in Arch Linux 2026-11-07. Parsed by carta from the page's man source.