Thread (10 messages) 10 messages, 2 authors, 2021-06-13

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

From: Chaitanya Kulkarni <hidden>
Date: 2021-06-12 19:18:50

On 6/11/21 02:17, Daniel Wagner wrote:
On Thu, Jun 10, 2021 at 09:01:14PM +0000, Chaitanya Kulkarni wrote:
quoted
commit 1368a1a5e7566d726bf74234d05895c3f0d54690
Author: Chaitanya Kulkarni [off-list ref]
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.
But that will require any controller to have at least one namespace, with
current implementation we don't enforce that behavior, maybe then we should
check that in the discovery or id controller path if ANA log page is
supported ?



_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help