[PATCH] Revert "nvme: verify MNAN value if ANA is enabled"

Daniel Wagner dwagner at suse.de
Fri Jun 11 02:17:42 PDT 2021


On Thu, Jun 10, 2021 at 09:01:14PM +0000, Chaitanya Kulkarni wrote:
> commit 1368a1a5e7566d726bf74234d05895c3f0d54690
> Author: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
> Date:   Wed Jun 9 20:07:00 2021 -0700
> 
>     nvme: fix the comparison in the mnan check
>    
>     The existing check for the valid mnan value will result in the error
>     when ctrl->max_namespaces are set to the 1024 from NVMeOF target since
>     !1024 == 0 so it will lead to next comparison 1024 > is->nn which will
>     be always true untill target has 1024 namespaces.

The commit message doesn't make sense to me. NSID is not limited to
1024.

>From the discussion in the other mail, I though the argument is, if
there are no namespaces on the target the MNAN is allowed to be
zero. The original check assumed there are always namespaces. The
proposed fix drops the first half of the specs statement:

  ... then this field shall be set to a non-zero value that is less than
  or equal to the NN value.




More information about the Linux-nvme mailing list