Blame SOURCES/0039-RH-detect-prio-fix.patch

4728c8
---
4728c8
 libmultipath/propsel.c |   11 +++++++++--
4728c8
 1 file changed, 9 insertions(+), 2 deletions(-)
4728c8
4728c8
Index: multipath-tools-130222/libmultipath/propsel.c
4728c8
===================================================================
4728c8
--- multipath-tools-130222.orig/libmultipath/propsel.c
4728c8
+++ multipath-tools-130222/libmultipath/propsel.c
4728c8
@@ -384,10 +384,17 @@ select_getuid (struct path * pp)
4728c8
 void
4728c8
 detect_prio(struct path * pp)
4728c8
 {
4728c8
+	int ret;
4728c8
 	struct prio *p = &pp->prio;
4728c8
 
4728c8
-	if (get_target_port_group_support(pp->fd) > 0)
4728c8
-		prio_get(p, PRIO_ALUA, DEFAULT_PRIO_ARGS);
4728c8
+	if (get_target_port_group_support(pp->fd) <= 0)
4728c8
+		return;
4728c8
+	ret = get_target_port_group(pp->fd);
4728c8
+	if (ret < 0)
4728c8
+		return;
4728c8
+	if (get_asymmetric_access_state(pp->fd, ret) < 0)
4728c8
+		return;
4728c8
+	prio_get(p, PRIO_ALUA, DEFAULT_PRIO_ARGS);
4728c8
 }
4728c8
 
4728c8
 extern int