fix NVMe multipath partition diskstats
Get series with b4
b4 am [email protected]Versions newest first
- v4 Latest4 patches 3 repliesIn review
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | block: support cloning partitionsblock/ include/ | +45 | 0 replies | |
| 2/4 | block: don't show partition diskstats for GENHD_FL_HIDDENblock/ | +2 | 0 replies | |
| 3/4 | nvme-multipath: clone head disk partitions to per-path disksdrivers/ | +32 | 0 replies | |
| 4/4 | nvme-multipath: fix diskstats for partitionsdrivers/ | +41 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 0/4] fix NVMe multipath partition diskstats
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 addresses that problem by first updating the gendisk code to create the partition table for hidden disks, as suggested by Keith.
This is done by cloning the partition table from the multipath disk.
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.
Difference to v3:
- Add block device operation disk changed CB
Difference to v2:
- don't scan per-path disk, and clone from multipath disk instead
John Garry (4):
block: support cloning partitions
block: don't show partition diskstats for GENHD_FL_HIDDEN
nvme-multipath: clone head disk partitions to per-path disks
nvme-multipath: fix diskstats for partitions
block/genhd.c | 3 +- block/partitions/core.c | 43 ++++++++++++++++++ drivers/nvme/host/multipath.c | 83 ++++++++++++++++++++++++++++++----- include/linux/blkdev.h | 2 + 4 files changed, 120 insertions(+), 11 deletions(-)
Signature · 1 line
2.43.0