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

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