[PATCH 1/2] nvmet: return Invalid Field for invalid NSIDs in Set Features 82h

Guixin Liu kanie at linux.alibaba.com
Sat Sep 19 18:57:17 PDT 2026



在 2026/9/18 20:05, Christoph Hellwig 写道:
> On Fri, Sep 18, 2026 at 11:39:31AM +0800, Guixin Liu wrote:
>> -		if (status)
>> +		if (status) {
>> +			/* 82h is Invalid Field for invalid NSIDs, not Invalid NS */
> Overly long line, but I don't this comment is very helpful as-is anyway.
> For one mentioning the value while the code uses symbolic names is
> confusing, but otherwise it also doesn't really say why we care.
> IMHO we can just drop it?
Yeah, sure, removed in v2.
>
>> +			if (status == (NVME_SC_INVALID_NS | NVME_STATUS_DNR))
> no need for the braces.
Sure.
>
>> +				status = NVME_SC_INVALID_FIELD | NVME_STATUS_DNR;
> Another overly long line.  Easily fixed by just directly returning:
>
> 				return NVME_SC_INVALID_FIELD | NVME_STATUS_DNR;
Changed in v2, and also in patch2, thanks.

Best Regards,
Guixin Liu




More information about the Linux-nvme mailing list