[PATCH 1/2] Undo fix priority made earlier

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

 



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@xxxxxxxxxx>

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@xxxxxxxxxx   |      .......you may get it.
----------------------------------------------------------------------

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux