[PATCH 1/3] tree: add support for discovering nvme paths using sysfs multipath link

Nilay Shroff nilay at linux.ibm.com
Mon Apr 7 06:43:37 PDT 2025



On 4/7/25 4:31 PM, Daniel Wagner wrote:
> On Mon, Apr 07, 2025 at 03:06:33PM +0530, Nilay Shroff wrote:
>>>> Please note that
>>>> this change is fully backward compatible.
>>>
>>> Could you elaborate what that means? libnvme should still work on older
>>> kernels.
>> Yeah I think as it's given that libnvme should work with older kernels, I 
>> probably don't need to spell that out explicitly. The intention is just
>> to mention that this change would not break running libnvme on older kernels.
>> But I think I could remove this sentence.
> 
> For some reason I read 'this change is NOT fully backward compatible'. My
> bad, sorry.
> 
>>> Also could you add a tests for this? The is already a test for the
>>> current sysfs tree parser, see test/sysfs.
>>>
>> Yes I'd add a testcase for this change. How about extending the existing 
>> test/sysfs/tree-dump.c? Or do you want me to add a new test case for this
>> change?
> 
> Ideally you just need to add new sysfs dump
> (scripts/collect-sysfs.sh) and have the corresponding output placed in
> the data directory. If not, yes please extend tree-dump.c.

I see that the current tree-dump.c test program neither dumps namespace nor
dumps namespace path. So I'd extend this program. I'd also replace the existing
sysfs dump with another dump which shall have two nvme subsystems. The one
of the subsystems shall represent a multi port disk with a shared namespace
reachable through multipath, and another subsystem shall represent a single-port
disk with a private namespace. So this way, we'd be able to cover both shared/
multipath namespace as well as private namespace use cases. 

Thanks,
--Nilay



More information about the Linux-nvme mailing list