[PATCH 2/3] nvme-core: don't check non-mdts for disc ctrl
Christoph Hellwig
hch at lst.de
Mon Apr 11 05:12:09 PDT 2022
On Mon, Apr 11, 2022 at 12:09:31PM +0000, Chaitanya Kulkarni wrote:
> - ret = nvme_init_non_mdts_limits(ctrl);
> - if (ret < 0)
> - return ret;
> + if (ctrl->cntrltype == NVME_CTRL_IO) {
> + ret = nvme_init_non_mdts_limits(ctrl);
> + if (ret < 0)
> + return ret;
> + }
This looks better, but I don't think it will actually work as-is.
The CNTRLTYPE field is never than discovry controllers. We
special case them in nvme_init_subsystem, which should move to
nvme_init_identify instead so that ctrl->cntrltype is always valid
after that.
More information about the Linux-nvme
mailing list