linux/drivers/nvme/host
Uday Shankar 811f4de034 nvme: avoid fallback to sequential scan due to transient issues
Currently, if nvme_scan_ns_list fails, nvme_scan_work will fall back to
a sequential scan. nvme_scan_ns_list can fail for a variety of reasons,
e.g. a transient transport issue, and the resulting sequential scan can
be extremely expensive on controllers reporting an NN value close to the
maximum allowed (> 4 billion). Avoid sequential scans wherever possible
by only falling back to them in two cases:

- When the NVMe version supported (VS) value reported by the device is
  older than NVME_VS(1, 1, 0), before which support of Identify NS List
  not required.
- When the Identify NS List command fails with the DNR bit set in the
  status. This is to accommodate (non-compliant) devices which report a
  VS value which implies support for Identify NS List, but nevertheless
  do not support the command. Such devices will most likely fail the
  command with the DNR bit set.

The third case is when the device claims support for Identify NS List
but the command fails with DNR not set. In such cases, fallback to
sequential scan is potentially expensive and likely unnecessary, as a
retry of the list scan should succeed. So this change skips the fallback
in this third case.

Signed-off-by: Uday Shankar <ushankar@purestorage.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2022-11-16 08:36:37 +01:00
..
apple.c nvme: move OPAL setup from PCIe to core 2022-11-15 10:55:53 +01:00
auth.c nvme-auth: have dhchap_auth_work wait for queues auth to complete 2022-11-16 08:36:36 +01:00
constants.c nvme-pci: print the command name of aborted commands 2022-08-02 17:22:48 -06:00
core.c nvme: avoid fallback to sequential scan due to transient issues 2022-11-16 08:36:37 +01:00
fabrics.c nvme: consider also host_iface when checking ip options 2022-09-19 17:55:24 +02:00
fabrics.h nvme: implement In-Band authentication 2022-08-02 17:14:49 -06:00
fault_inject.c block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
fc.c nvme: move OPAL setup from PCIe to core 2022-11-15 10:55:53 +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-hwmon: kmalloc the NVME SMART log buffer 2022-10-19 12:43:13 +02:00
ioctl.c nvme: identify-namespace without CAP_SYS_ADMIN 2022-11-15 10:50:30 +01:00
Kconfig nvme-auth: Diffie-Hellman key exchange support 2022-08-02 17:14:49 -06:00
Makefile nvme: don't always build constants.o 2022-08-02 17:22:48 -06:00
multipath.c nvme-multipath: fix possible hang in live ns resize with ANA access 2022-10-12 11:42:58 +02:00
nvme.h nvme-auth: convert dhchap_auth_list to an array 2022-11-16 08:36:36 +01:00
pci.c nvme-pci: don't unbind the driver on reset failure 2022-11-16 08:36:33 +01:00
rdma.c nvme-rdma: stop auth work after tearing down queues in error recovery 2022-11-16 08:36:37 +01:00
tcp.c nvme-tcp: stop auth work after tearing down queues in error recovery 2022-11-16 08:36:37 +01:00
trace.c nvme: implement In-Band authentication 2022-08-02 17:14:49 -06:00
trace.h nvme: use command_id instead of req->tag in trace_nvme_complete_rq() 2022-08-02 17:22:46 -06:00
zns.c block: pass a gendisk to blk_queue_max_open_zones and blk_queue_max_active_zones 2022-07-06 06:46:26 -06:00