aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/common/(developers-only)
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2025-07-09 14:17:41 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2025-07-09 14:19:45 +0000
commit5c59cec2d5e141de54bbc737477a8e498685186a (patch)
treef03339351eac78d8b9eb387df896b83aace4ece8 /cddl/contrib/opensolaris/common/(developers-only)
parent21876224361ad3c01e784d3a7fbe5ad808e00b4c (diff)
nvmf: Auto-reconnect periodically after a disconnectHEADmain
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. This differs from iSCSI which uses a dedicated daemon (iscsid(8)) to wait inside a custom ioctl for an iSCSI initiator event to occur, but I think this design might be simpler. 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 instead of using taskqueue_thread as the controller loss task could deadlock waiting for the completion of other tasks queued to taskqueue_thread. (Specifically, tearing down the CAM SIM can trigger destroy_dev_sched_cb() and waits for the callback to run, but the callback is scheduled to run in a task on taskqueue_thread. Possibly, destroy_dev_sched should be using a dedicated taskqueue.) Reviewed by: imp (earlier version) Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D50222
Diffstat (limited to 'cddl/contrib/opensolaris/common/(developers-only)')
0 files changed, 0 insertions, 0 deletions