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

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