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

Uday Shankar ushankar at purestorage.com
Wed Nov 9 13:04:05 PST 2022


On Wed, Nov 09, 2022 at 07:23:30AM +0100, Christoph Hellwig wrote:
> On Tue, Nov 08, 2022 at 04:41:20PM -0700, Keith Busch wrote:
> > Looks fine, but I really don't look forward to finding out how many
> > devices, if any, were secretly relying on this fallback.
> 
> I'm a little worried as well.  Maybe we can whitelist a few status
> codes as suggestions that a device might just be a broken.  I.e.
> "NVME_INVALID_FIELD | NVME_DNR" would very much be an indicator of tat.

Can we get away with just testing for the DNR bit? The practical goal of
this patch is to prevent fallback to sequential scan when the Identify
NS List command fails for transient reasons, and I think the error code
returned in such cases should not have DNR set.

> Also Uday, the return value from nvme_scan_ns_list can and should be
> dropped now.

We'll want to keep the return value if we go with the above suggestion.



More information about the Linux-nvme mailing list