[PATCH 3/5] nvme: refactor namespace probing

Christoph Hellwig hch at lst.de
Wed Jul 13 04:27:12 PDT 2022


On Wed, Jul 13, 2022 at 03:47:00PM +0530, Kanchan Joshi wrote:
>> -	if ((ctrl->cap & NVME_CAP_CRMS_CRIMS) &&
>> -	    !nvme_identify_ns_cs_indep(ctrl, nsid, &id)) {
>> -		ready = id->nstat & NVME_NSTAT_NRDY;
>> -		kfree(id);
>> +	if (ctrl->cap & NVME_CAP_CRMS_CRIMS) {
>> +		if (nvme_ns_info_from_id_cs_indep(ctrl, &info))
>> +			return;
>
> Is this return fine if independent id-ns fails? Earlier behavior was to
> ingore such failure.

Good point.  If NVME_CAP_CRMS_CRIMS is supported we really need to
support this log page, and later on for the unknown command sets
we need as well.  So I don't think we can do without it here, but
maybe that is worth mentioning in the commit log



More information about the Linux-nvme mailing list