linux/drivers/nvme/host
Victor Gladkov 8c4dfea97f nvme-fabrics: reject I/O to offline device
Commands get stuck while Host NVMe-oF controller is in reconnect state.
The controller enters into reconnect state when it loses connection with
the target.  It tries to reconnect every 10 seconds (default) until
a successful reconnect or until the reconnect time-out is reached.
The default reconnect time out is 10 minutes.

Applications are expecting commands to complete with success or error
within a certain timeout (30 seconds by default).  The NVMe host is
enforcing that timeout while it is connected, but during reconnect the
timeout is not enforced and commands may get stuck for a long period or
even forever.

To fix this long delay due to the default timeout, introduce new
"fast_io_fail_tmo" session parameter.  The timeout is measured in seconds
from the controller reconnect and any command beyond that timeout is
rejected.  The new parameter value may be passed during 'connect'.
The default value of -1 means no timeout (similar to current behavior).

Signed-off-by: Victor Gladkov <victor.gladkov@kioxia.com>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chao Leng <lengchao@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2020-12-01 20:36:37 +01:00
..
core.c nvme-fabrics: reject I/O to offline device 2020-12-01 20:36:37 +01:00
fabrics.c nvme-fabrics: reject I/O to offline device 2020-12-01 20:36:37 +01:00
fabrics.h nvme-fabrics: reject I/O to offline device 2020-12-01 20:36:37 +01:00
fault_inject.c nvme: enable to inject errors into admin commands 2019-06-21 11:15:50 +02:00
fc.c nvme: use consistent macro name for timeout 2020-12-01 20:36:35 +01:00
fc.h nvme-fc: Update header and host for common definitions for LS handling 2020-05-09 16:18:33 -06:00
hwmon.c nvme: return errors for hwmon init 2020-09-22 17:49:55 +02:00
Kconfig nvme-tcp: fix kconfig dependency warning when !CRYPTO 2020-09-15 07:58:49 +02:00
lightnvm.c nvme: split nvme_alloc_request() 2020-12-01 20:36:35 +01:00
Makefile nvme: support for zoned namespaces 2020-07-08 16:16:20 +02:00
multipath.c nvme-fabrics: reject I/O to offline device 2020-12-01 20:36:37 +01:00
nvme.h nvme-fabrics: reject I/O to offline device 2020-12-01 20:36:37 +01:00
pci.c nvme-pci: don't allocate unused I/O queues 2020-12-01 20:36:36 +01:00
rdma.c nvme: use consistent macro name for timeout 2020-12-01 20:36:35 +01:00
tcp.c nvme: use consistent macro name for timeout 2020-12-01 20:36:35 +01:00
trace.c nvme: trace: parse Get LBA Status command in detail 2019-08-29 12:55:01 -07:00
trace.h nvme-trace: print result and status in hex format 2019-06-21 11:12:37 +02:00
zns.c nvme: remove the disk argument to nvme_update_zone_info 2020-10-07 07:56:17 +02:00