Revert "Set priority to '0' for PATH_BLOCKED or PATH_DOWN"
authorMartin Wilck <mwilck@suse.com>
Thu, 11 Apr 2019 10:49:21 +0000 (12:49 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 19 Apr 2019 13:37:39 +0000 (15:37 +0200)
This reverts commit ce8d707c4235860373238dea6491a77a931d4c9f.

In check_path(), we don't touch path priority if a path is down.
But when pathinfo(DI_CHECKER) is called in down state, we reset
the priority to 0. This is inconsistent.

Commit ce8d707 was about maps being rejected during multipath startup
because of undefined priorities. Since commit 94036e3 "libmultipath:
don't reject maps with undefined prio", such maps aren't rejected
any more, thus we can skip resetting the priority to 0.

Note that when we calculate path group priorities, the prio of
paths which are not UP or GHOST are ignored anyway, so this
change will not cause changes wrt PG priorities or PG ordering.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Cc: Hannes Reinecke <hare@suse.de>
libmultipath/discovery.c

index 00ffd06..5c3b81f 100644 (file)
@@ -2002,9 +2002,6 @@ int pathinfo(struct path *pp, struct config *conf, int mask)
                } else {
                        condlog(3, "%s: path inaccessible", pp->dev);
                        pp->chkrstate = pp->state = path_state;
-                       if (path_state == PATH_PENDING ||
-                           path_state == PATH_DOWN)
-                               pp->priority = 0;
                }
        }