[PATCH] Revert "nvme: verify MNAN value if ANA is enabled"
Daniel Wagner
dwagner at suse.de
Fri Jun 11 02:08:19 PDT 2021
Hi Chaitanay,
On Thu, Jun 10, 2021 at 08:32:56PM +0000, Chaitanya Kulkarni wrote:
> Let us look into the host side issue first then we can move to target side.
Sure
> Consider a scenario where ANA enabled subsys with 0 namespaces on the target
> side. When host issues connect command to such a controller ctrl->mnan
> should be 0 and ctrl->nn should be 0 which should be valid.
>
> With original check in the code :-
>
> if (!ctrl->max_namespaces ||
> ctrl->max_namespaces > le32_to_cpu(id->nn))
In the scenario you describe this is obvious wrong. I suspect we can't
decide if there are namespaces on the target side enabled or not at this
point. Maybe later in the discovery path we could check max_namespace
again. But I don't know if this is the trouble worth.
So yes I agree with your proposed change. In the end it's not important
anyway.
Thanks,
Daniel
More information about the Linux-nvme
mailing list