]> granicus.if.org Git - sysstat/commitdiff
Fix #263: Incorrect device name from iostat
authorSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 24 Jul 2020 14:52:18 +0000 (16:52 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 24 Jul 2020 14:52:18 +0000 (16:52 +0200)
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 <sysstat@users.noreply.github.com>
iostat.c

index 8ef2249a18483793ef26e7c05980fd03402e30d2..211b4c29de1d5f17daec909eab656e21b4bf81c1 100644 (file)
--- 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) {