[PATCH] tree: Add NVM subsystem controller identifier

Hannes Reinecke hare at suse.de
Tue Mar 26 00:10:42 PDT 2024


On 3/26/24 07:57, Nilay Shroff wrote:
> This commit introduces a field "cntlid" for controller,
> that contains the NVM subsystem unique identifier assigned
> to each controller device in an NVM subsystem.
> 
> While attaching a namespace, typically user needs to specify the
> controller identifier (cntlid). The cntlid could be referenced from
> sysfs (/sys/class/nvme/nvmeX/cntlid) but it would be nice to have
> a direct option.
>  > Signed-off-by: Nilay Shroff <nilay at linux.ibm.com>
> ---
> Hi all,
> 
> While attaching an NVMe namespace using nvme-cli command
> "nvme attach-ns", we need to specifiy controller identifier
> (cntlid) against which the namespace is being attached.
> 
> Not specifying cntlid while attaching namespace would result in
> no actual change in namespace attachment. For instance,
> 
> # nvme create-ns /dev/nvme0 --nsze=0x156d56 --ncap=0x156d56  --block-size=4096
> create-ns: Success, created nsid:1
> 
> # nvme attach-ns /dev/nvme0 -n 1
> warning: empty controller-id list will result in no actual change in namespace attachment
> attach-ns: Success, nsid:1
> 

Errm. How would that work? /dev/nvme0 _is_ a controller, and as such 
will have an assigned cntlid. And if one would issue an 'attach-ns'
command the only controller which it could address is that controller
to which the command is issued.
I'd be _very_ surprised if you could issue 'attach-ns' against _another_
controller. So why do we need this option?
Shouldn't we rather infer the cntlid from the existing controller?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare at suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich




More information about the Linux-nvme mailing list