libmultipath: get_prio(): really don't reset prio for inaccessible paths
authorMartin Wilck <mwilck@suse.com>
Thu, 16 May 2019 07:10:24 +0000 (09:10 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 3 Jul 2019 06:01:24 +0000 (08:01 +0200)
As pointed out by Ben Marzinski, my previous patch ebbb56f2 doesn't do what
it pretends to do.

Fixes: ebbb56f2 "libmultipath: get_prio(): don't reset prio for inaccessible
paths"

libmultipath/discovery.c

index b3dc60b..856c52c 100644 (file)
@@ -1648,10 +1648,11 @@ get_prio (struct path * pp)
                /* this changes pp->offline, but why not */
                int state = path_offline(pp);
 
-               if (state == PATH_DOWN || state == PATH_PENDING)
+               if (state == PATH_DOWN || state == PATH_PENDING) {
+                       pp->priority = old_prio;
                        condlog(3, "%s: %s prio error in state %d, keeping prio = %d",
                                pp->dev, prio_name(p), state, pp->priority);
-               else {
+               else {
                        condlog(3, "%s: %s prio error in state %d",
                                pp->dev, prio_name(p), state);
                        pp->priority = PRIO_UNDEF;