alua: Do not add preferred path priority for active/optimized
authorHannes Reinecke <hare@suse.de>
Tue, 16 Jul 2013 07:12:54 +0000 (09:12 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 16 Jul 2013 19:49:17 +0000 (21:49 +0200)
When a path is in active/optimized we should disregard the
'preferred path' bit when calculating the priority.
Otherwise we'll end up with having two different priorities
(one for 'active/optimized (preferred)' and one for
'active/optimized (non-preferred)').
Which will result in two different path groups and a
sub-optimal path usage.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/prioritizers/alua.c

index b9493a4..4165ec6 100644 (file)
@@ -108,7 +108,7 @@ int getprio (struct path * pp, char * args)
                        default:
                                rc = 0;
                }
-               if (priopath)
+               if (priopath && aas != AAS_OPTIMIZED)
                        rc += 80;
        } else {
                switch(-rc) {