openSUSE / hwinfo

Hardware information tool
GNU General Public License v2.0
259 stars 70 forks source link

Keep NVMe's namespace output consistency when nvme_core.multipath=1 (bsc#1199948) #113

Closed wfeldt closed 2 years ago

wfeldt commented 2 years ago

Problem

hwinfo --disk output shows that disk is not attached to any nvme pci controller.

The offending drives set the CMIC value to non-zero, causing it to be recognized as a multipath device.

Solution

When nvme_core.multipath=1 the device link in the SysFS's namespace entry points to nvme-subsys# and that causes some missing information, specificaly about PCI and namespace's parent device.

Here we go through the parent device withihn the nvme-subsys to gather complete information, and making the output's ompatible to the previously seen.

Signed-off-by: Mauro S. M. Rodrigues maurosr@linux.vnet.ibm.com