[PATCH RFC] nvme-multipath: fix diskstats for partitions

John Garry john.g.garry at oracle.com
Tue Aug 11 01:28:35 PDT 2026


On 11/08/2026 01:55, Keith Busch wrote:
> On Thu, Jul 30, 2026 at 01:52:00PM +0100, John Garry wrote:
>>
>> With that, /sys/class/block/ looks a bit different (with the per-path
>> partitions):
>>
>> #ls -l /sys/class/block/ | grep nvme0
>> lrwxrwxrwx    1 root     root             0 Jul 30 12:39 nvme0c0n1 ->
>> ../../devices/virtual/nvme-fabrics/ctl/nvme0/nvme0c0n1
>> lrwxrwxrwx    1 root     root             0 Jul 30 12:39 nvme0c0n1p1
>> -> ../../devices/virtual/nvme-fabrics/ctl/nvme0/nvme0c0n1/nvme0c0n1p1
>> lrwxrwxrwx    1 root     root             0 Jul 30 12:39 nvme0c1n1 ->
>> ../../devices/virtual/nvme-fabrics/ctl/nvme1/nvme0c1n1
>> lrwxrwxrwx    1 root     root             0 Jul 30 12:39 nvme0c1n1p1
>> -> ../../devices/virtual/nvme-fabrics/ctl/nvme1/nvme0c1n1/nvme0c1n1p1
>> lrwxrwxrwx    1 root     root             0 Jul 30 12:39 nvme0n1 ->
>> ../../devices/virtual/nvme-subsystem/nvme-subsys0/nvme0n1
>> lrwxrwxrwx    1 root     root             0 Jul 30 12:39 nvme0n1p1 ->
>> ../../devices/virtual/nvme-subsystem/nvme-subsys0/nvme0n1/nvme0n1p1
>>
>> Thoughts?
> 
> Yes, looks good to me, though I don't really know why partition scanning
> was skipped in the first place. I always thought the important part was
> the HIDDEN devices don't automatically enumerate in /dev/.

Yeah, there's more than just hiding the /dev/ entry.

 From 8ddcd653257c, GENHD_FL_SUPPRESS_PARTITION_INFO was set (from 
GENHD_FL_HIDDEN) so that those per-path partitions don't show up in 
/proc/partitions. From that, it was decided to just not scan the 
partitions. We don't want userspace needlessly notified of per-path 
partition scan events.

Another commit of interest is 3b5149ac5097, where 
GENHD_FL_SUPPRESS_PARTITION_INFO is replaced by GENHD_FL_HIDDEN.



More information about the Linux-nvme mailing list