From d83226cc267738723d4edefd4e6055917f15fa51 Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Fri, 24 Jul 2020 16:52:18 +0200 Subject: [PATCH] Fix #263: Incorrect device name from iostat Using sysstat.ioconf configure file to determine the device name based on its major and minor numbers gives a wrong name for xvd* devices with big minor numbers. Don't use it any more as there are other ways to find the name (e.g. we can read the symlink in /sys/dev/block/). Signed-off-by: Sebastien GODARD --- iostat.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/iostat.c b/iostat.c index 8ef2249..211b4c2 100644 --- a/iostat.c +++ b/iostat.c @@ -1846,18 +1846,6 @@ void write_stats(int curr, struct tm *rectime, int skip) dev_name = transform_devmapname(d->major, d->minor); } - if (!dev_name && ((dev_name = ioc_name(d->major, d->minor)) != NULL)) { - if (!strcmp(d->name, dev_name) || !strcmp(dev_name, K_NODEV)) { - /* - * Ignore name given by sysstat.ioconf if it's the same - * as current one or if it's "nodev". - * NB: Using names generated from sysstat.ioconf data - * works around known issues with EMC PowerPath. - */ - dev_name = NULL; - } - } - if (DISPLAY_PERSIST_NAME_I(flags)) { pdname = get_persistent_name_from_pretty(dev_name ? dev_name : d->name); if (pdname) { -- 2.40.0