[PATCH] nvme: fix cntlid uniqueness check for different hosts

Sagi Grimberg sagi at grimberg.me
Fri Sep 11 15:45:04 PDT 2026



On 02/09/2026 16:47, Christoph Hellwig wrote:
> On Sun, Aug 23, 2026 at 03:15:09AM +0300, Sagi Grimberg wrote:
>> A single physical host may use a separate {hostnqn, hostid} identifiers
>> when connecting to a controller.
> Not really.  As the hostid defines a host.  Linux just might be able to
> implement multiple hosts when it say hosts multiple containers.

Well, from the subsystem perspective, it is a separate host.

>
>> It is possible that the a distributed
>> nvmf controller may generate unique cntlid per hostnqn and not globally
>> unique. Hence, validate the cntlid is unique per nvmf host.
> If it does so it is not spec compliant, and we should not support it.

Hmm, interesting. It didn't occur to me that the cross-hosts controller IDs
are meaningful in any way.. The issue is that if a host connects to multiple
subsystem ports (say 16 for multipath), and also may use multiple 
hostnqn/hostid
pairs, the available number of cntlids starts dropping very quickly 
given that
there are only 16 bits in cntlid.

I am wandering if this issue was observed by others.



More information about the Linux-nvme mailing list