From 25251f26b82e7f729be7140cbb806791e07da70c Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Thu, 10 Feb 2011 10:35:28 +0100 Subject: [PATCH] libmultipath: Only count UP and GHOST paths for prio update When calculating the priority of a pathgroup we should be counting only UP and GHOST paths; all other values might be stale. References: bnc#665289 Signed-off-by: Hannes Reinecke --- libmultipath/switchgroup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmultipath/switchgroup.c b/libmultipath/switchgroup.c index 025a95d..031c3d7 100644 --- a/libmultipath/switchgroup.c +++ b/libmultipath/switchgroup.c @@ -20,7 +20,8 @@ path_group_prio_update (struct pathgroup * pgp) return; } vector_foreach_slot (pgp->paths, pp, i) { - if (pp->state != PATH_DOWN) { + if (pp->state == PATH_UP || + pp->state == PATH_GHOST) { priority += pp->priority; pgp->enabled_paths++; } -- 2.34.1