[dm-devel] [patch]: [multipath-tool] Add check for removed device in rdac checker

Yanqing_Liu at Dell.com Yanqing_Liu at Dell.com
Mon Oct 27 15:11:28 UTC 2008


Hi,

This patch adds a check for removed device in rdac checker. After volume
access inquiry returns, the checker will check the peripheral qualifier
field to see if the device is deleted/unmapped. If so, mark path as
failed.

Signed off by: Yanqing Liu <Yanqing_Liu at Dell.com>

---

--- libcheckers/rdac.c.orig	2008-10-22 02:52:33.000000000 -0400
+++ libcheckers/rdac.c	2008-10-17 03:43:13.000000000 -0400
@@ -27,6 +27,7 @@
 #define MSG_RDAC_UP    "rdac checker reports path is up"
 #define MSG_RDAC_DOWN  "rdac checker reports path is down"
 #define MSG_RDAC_GHOST "rdac checker reports path is ghost"
+#define MSG_RDAC_DELETED "rdac checker reports path deleted"
 
 struct rdac_checker_context {
 	void * dummy;
@@ -90,7 +91,8 @@
 
 struct volume_access_inq
 {
-	char dontcare0[8];
+	char qualifier;
+	char dontcare0[7];
 	char avtcvp;
 	char dontcare1[39];
 };
@@ -104,6 +106,12 @@
 		MSG(c, MSG_RDAC_DOWN);
 		return PATH_DOWN;
 	}
+	
+	if (0 != inq.qualifier) {
+		MSG(c, MSG_RDAC_DELETED);
+		return PATH_DOWN;
+	}
+		
 
 	return ((inq.avtcvp & 0x1) ? PATH_UP : PATH_GHOST);  }







More information about the dm-devel mailing list