If all paths are removed from a multipath table there is no
point in trying to switch path groups as we don't have any.

Signed-off-by: Hannes Reinecke <h...@suse.com>
---
 multipathd/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/multipathd/main.c b/multipathd/main.c
index ebb9a50..a86530f 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -126,6 +126,9 @@ need_switch_pathgroup (struct multipath * mpp, int refresh)
                        vector_foreach_slot (pgp->paths, pp, j)
                                pathinfo(pp, conf->hwtable, DI_PRIO);
 
+       if (!mpp->pg || VECTOR_SIZE(mpp->paths) == 0)
+               return 0;
+
        mpp->bestpg = select_path_group(mpp);
 
        if (mpp->bestpg != mpp->nextpg)
-- 
2.6.6

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

Reply via email to