[PATCH v2] nvme: scan sequentially only when list scan unsupported

Keith Busch kbusch at kernel.org
Tue Nov 8 15:41:20 PST 2022


On Mon, Nov 07, 2022 at 12:54:44PM -0700, Uday Shankar wrote:
> 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. 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 if nvme_scan_ns_list fails due to
> controller non-support of Identify NS List. This breaks (noncompliant)
> devices that claim to support version NVME_VS(1, 1, 0) or later, but
> don't support Identify NS List. Such devices can be made to work again
> using the existing NVME_QUIRK_IDENTIFY_CNS.

Looks fine, but I really don't look forward to finding out how many
devices, if any, were secretly relying on this fallback.



More information about the Linux-nvme mailing list