diff mbox

[03/30] alua: Do not add preferred path priority for active/optimized

Message ID 1373958801-103613-4-git-send-email-hare@suse.de (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Hannes Reinecke July 16, 2013, 7:12 a.m. UTC
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libmultipath/prioritizers/alua.c b/libmultipath/prioritizers/alua.c
index b9493a4..4165ec6 100644
--- a/libmultipath/prioritizers/alua.c
+++ b/libmultipath/prioritizers/alua.c
@@ -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) {