Use a timer in the nvmf(4) driver to periodically trigger a
devctl "reconnect" notification. A trigger in the /etc/devd/nvmf.conf
file invokes "nvmecontrol reconnect nvmeX" upon each notification.
Similar to nvme-cli, the interval between reconnection attempts is
specified in seconds by the --reconnect-delay argument to the connect
and reconnect commands. Note that nvme-cli uses -c for short letter
of this command, but that was already taken so nvmecontrol uses -r.
The default is 10 seconds to match Linux.
In addition, a second timeout can be used to force a full detach of a
disconnected the nvmeX device after the controller loss timeout
expires. The timeout for this is specified in seconds by the
--ctrl-loss-tmo/-l options (identical to nvme-cli). The default is
600 seconds.
Either of these timers can be disabled by setting the timer to 0. In
that case, the associated action (devctl notifications or full detach)
will not occur after a disconnect.
Note that this adds a dedicated taskqueue for nvmf tasks as the
controller loss task could deadlock waiting for tasks it's task
handler enqueued on taskqueue_thread.
Sponsored by: Chelsio Communications