diff mbox

multipath-tools: rdac path checked leads to I/O hang when volumes are unmapped from storage.

Message ID 0D1E8821739E724A86F4D16902CE275C1C93A0247B@inbmail01.lsi.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chauhan, Vijay Oct. 20, 2009, 1:09 p.m. UTC
None
diff mbox

Patch

--- multipath-tools/libmultipath/checkers/rdac.c.orig	2009-10-20 23:01:50.000000000 +0530
+++ multipath-tools/libmultipath/checkers/rdac.c	2009-10-20 23:49:31.000000000 +0530
@@ -91,7 +91,8 @@  do_inq(int sg_fd, unsigned int pg_op, vo
 
 struct volume_access_inq
 {
-	char dontcare0[8];
+	char PQ_PDT;
+	char dontcare0[7];
 	char avtcvp;
 	char dontcare1[39];
 };
@@ -105,6 +106,11 @@  libcheck_check (struct checker * c)
 	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) {