Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC v2 0/2] fix NVMe multipath partition diskstats
@ 2026-08-18 12:08 John Garry
  2026-08-18 12:08 ` [PATCH RFC v2 1/2] block: scan partitions for hidden disks John Garry
  2026-08-18 12:08 ` [PATCH RFC v2 2/2] nvme-multipath: fix diskstats for partitions John Garry
  0 siblings, 2 replies; 7+ messages in thread
From: John Garry @ 2026-08-18 12:08 UTC (permalink / raw)
  To: axboe, kbusch, hch, sagi; +Cc: linux-block, linux-nvme, John Garry

Currently the NVMe multipath partition diskstats are not maintained.
This is because the functionality to update the diskstats only updates
for the whole disk (and not per partition).

As an example:
$ ./fio_read nvme1n1p1 # run traffic on /dev/nvme1n1p1
...
$ more /proc/diskstats | grep nvme1
 259       2 nvme1c1n1 49857 0 400344 768565 0 0 0 0 0 2334 768565 0 0 0 0 0 0
 259       3 nvme1n1 99710 0 800680 1599285 0 0 0 0 0 2346 1599285 0 0 0 0 0 0
 259       5 nvme1n1p1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 259       4 nvme1c2n1 49853 0 400336 831472 0 0 0 0 0 2315 831472 0 0 0 0 0 0

Notice how all values are 0 for nvme1n1p1.

This series addressed that problem by first updating the gendisk code to
create the partition table for hidden disks, as suggested by Keith.

Secondly the NVMe multipath functionality to handle the diskstats is
modified to handle the gendisk partition, by looking up this partition
from the per-path disk partition.

Original RFC is at the following:
https://lore.kernel.org/linux-nvme/20260721114553.1657841-1-john.g.garry@oracle.com/

John Garry (2):
  block: scan partitions for hidden disks
  nvme-multipath: fix diskstats for partitions

 block/genhd.c                 | 20 ++++++++++----------
 block/partitions/core.c       |  5 +++--
 drivers/nvme/host/core.c      |  4 ----
 drivers/nvme/host/multipath.c | 31 +++++++++++++++++++++++++------
 include/linux/blkdev.h        |  2 +-
 5 files changed, 39 insertions(+), 23 deletions(-)

-- 
2.43.7



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-08-19  9:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18 12:08 [PATCH RFC v2 0/2] fix NVMe multipath partition diskstats John Garry
2026-08-18 12:08 ` [PATCH RFC v2 1/2] block: scan partitions for hidden disks John Garry
2026-08-19  9:00   ` Christoph Hellwig
2026-08-19  9:12     ` John Garry
2026-08-19  9:13       ` Christoph Hellwig
2026-08-19  9:43         ` John Garry
2026-08-18 12:08 ` [PATCH RFC v2 2/2] nvme-multipath: fix diskstats for partitions John Garry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox