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