Skip to contentSkip to conversation

multipath-tools/libcheckers rdac.c

PATCH [email protected] 1 participant 1 message Nov 4, 2009 Device mapper

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: [email protected] 2009-11-04 20:21:43

Modified files:
libcheckers : rdac.c

Log message:
Fix for bz #531744. In rdac path checker, check if devices are connected, and if they are not, mark the path as failed. Already upstream.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libcheckers/rdac.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.1.2.3&r2=1.1.2.4

libcheckers/Attic/rdac.c +7 -1
@@ -90,7 +90,8 @@
 
 struct volume_access_inq
 {
-	char dontcare0[8];
+	char PQ_PDT;
+	char dontcare0[7];
 	char avtcvp;
 	char dontcare1[39];
 };
@@ -103,6 +104,11 @@
 	if (0 != do_inq(c->fd, 0xC9, &inq, sizeof(struct volume_access_inq))) {
 		MSG(c, MSG_RDAC_DOWN);
 		return PATH_DOWN;
+	} else {
+		if ((inq.PQ_PDT & 0x20) || (inq.PQ_PDT & 0x7f)) {
+			/* LUN not connected*/
+			return PATH_DOWN;
+		}
 	}
 
 	if (inq.avtcvp & 0x1) {