[PATCH v3 2/2] nvme: enable generic interface (/dev/ngXnY) for unknown command sets
Keith Busch
kbusch at kernel.org
Wed Jun 22 13:20:05 PDT 2022
On Wed, Jun 22, 2022 at 03:55:56PM +0200, Joel Granados wrote:
> static void nvme_validate_or_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
> {
> struct nvme_ns_ids ids = { };
> - struct nvme_id_ns_cs_indep *id;
> + struct nvme_id_ns_cs_indep *id_indep;
> struct nvme_ns *ns;
> - bool ready = true;
>
> if (nvme_identify_ns_descs(ctrl, nsid, &ids))
> return;
>
> + if (nvme_identify_ns_cs_indep(ctrl, nsid, &id_indep))
> + return;
> +
There's no check that the command-set-independent namespace identification is
supported, so an error should be expected for many controllers instead of
abandoning the namespace.
More information about the Linux-nvme
mailing list