[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] [PATCH 2/3] Fix the priority calculation to use PATH_GHOST state



Index: multipath-tools-0.4.7/libmultipath/discovery.c
===================================================================
--- multipath-tools-0.4.7.orig/libmultipath/discovery.c	2007-03-20 14:45:21.000000000 -0700
+++ multipath-tools-0.4.7/libmultipath/discovery.c	2007-03-20 14:45:41.000000000 -0700
@@ -699,7 +699,7 @@
 	if (mask & DI_CHECKER && get_state(pp))
 		goto blank;
 	
-	if (mask & DI_PRIO && pp->state != PATH_DOWN)
+	if (mask & DI_PRIO && pp->state == PATH_UP)
 		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-03-20 14:45:21.000000000 -0700
+++ multipath-tools-0.4.7/libmultipath/switchgroup.c	2007-03-20 14:45:41.000000000 -0700
@@ -28,7 +28,7 @@
 		priority = 0;
 
 		vector_foreach_slot (pgp->paths, pp, j) {
-			if (pp->state != PATH_DOWN)
+			if (pp->state == PATH_UP)
 				priority += pp->priority;
 		}
 		pgp->priority = priority;

-- 

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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]