Scroll to navigation

libnvme_transport_handle_set_decide_retry(9) libnvme API manual libnvme_transport_handle_set_decide_retry(9)

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

Transport handle to configure
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.

libnvme_transport_handle_set_decide_retry July 2026