[dm-devel] [PATCH 1/2] Undo fix priority made earlier

Chandra Seetharaman sekharan at us.ibm.com
Mon May 21 21:50:37 UTC 2007


While debugging I found that multipath was not selecting the preferred path
many a times (inlcuding the failback scenarios). 

Added a priority callout function and the expected behavior was still not
seen (patch 2 of 2).

More debugging revealed that the changes I made to work in the ghost
mode was wrong. Reverting those changes made the multipath behave properly.

Signed-off-by: Chandra Seetharaman <sekharan at us.ibm.com>

Index: multipath-tools-0.4.7/libmultipath/discovery.c
===================================================================
--- multipath-tools-0.4.7.orig/libmultipath/discovery.c	2007-04-05 15:25:09.000000000 -0700
+++ multipath-tools-0.4.7/libmultipath/discovery.c	2007-05-17 10:07:56.000000000 -0700
@@ -699,7 +699,7 @@
 	if (mask & DI_CHECKER && get_state(pp))
 		goto blank;
 	
-	if (mask & DI_PRIO && pp->state == PATH_UP)
+	if (mask & DI_PRIO && pp->state != PATH_DOWN)
 		get_prio(pp);
 
 	if (mask & DI_WWID && !strlen(pp->wwid))
Index: multipath-tools-0.4.7/libmultipath/switchgroup.c
===================================================================
--- multipath-tools-0.4.7.orig/libmultipath/switchgroup.c	2007-04-04 12:25:32.000000000 -0700
+++ multipath-tools-0.4.7/libmultipath/switchgroup.c	2007-05-17 10:07:56.000000000 -0700
@@ -28,7 +28,7 @@
 		priority = 0;
 
 		vector_foreach_slot (pgp->paths, pp, j) {
-			if (pp->state == PATH_UP)
+			if (pp->state != PATH_DOWN)
 				priority += pp->priority;
 		}
 		pgp->priority = priority;

-- 

----------------------------------------------------------------------
    Chandra Seetharaman               | Be careful what you choose....
              - sekharan at us.ibm.com   |      .......you may get it.
----------------------------------------------------------------------




More information about the dm-devel mailing list