diff options
author | Hannes Reinecke <hare@suse.de> | 2011-02-18 08:25:59 +0100 |
---|---|---|
committer | Hannes Reinecke <hare@suse.de> | 2011-05-03 13:45:22 +0200 |
commit | c919aea24b617f239d1a8d973b2f4593a6948bfa (patch) | |
tree | 38715636246e18863cece68a0ddf6593f6d48ac4 | |
parent | 44f79b5ba75300afd8c86efa2c7170813c4288d1 (diff) | |
download | multipath-tools-c919aea24b617f239d1a8d973b2f4593a6948bfa.tar.gz |
libmultipath: correct path count in setup_map()
We should be counting both, UP and GHOST paths when counting the
number of available paths. Otherwise the count might become
negative and multipath would never switch into recovery mode.
References: bz#677821
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
-rw-r--r-- | libmultipath/configure.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmultipath/configure.c b/libmultipath/configure.c index 048fdd7..d512a1a 100644 --- a/libmultipath/configure.c +++ b/libmultipath/configure.c @@ -88,7 +88,7 @@ setup_map (struct multipath * mpp, char * params, int params_size) if (mpp->pgpolicyfn && mpp->pgpolicyfn(mpp)) return 1; - mpp->nr_active = pathcount(mpp, PATH_UP); + mpp->nr_active = pathcount(mpp, PATH_UP) + pathcount(mpp, PATH_GHOST); /* * ponders each path group and determine highest prio pg |