Skip to contentSkip to conversation

multipath-tools/libcheckers Makefile checkers. ...

PATCH [email protected] 1 participant 1 message Nov 24, 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-24 20:03:16

Modified files:
libcheckers : Makefile checkers.c checkers.h tur.c
Added files:
libcheckers : hp_tur.h

Log message:

	Fix for 437585.
	Added hp_tur checker, that checks if the LUNs wwid has changed.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libcheckers/hp_tur.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libcheckers/Makefile.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.5.2.2&r2=1.5.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libcheckers/checkers.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.1.2.3&r2=1.1.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libcheckers/checkers.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.5.2.3&r2=1.5.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libcheckers/tur.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.4.2.3&r2=1.4.2.4

libcheckers/Makefile +4 -1
@@ -6,7 +6,7 @@
 
 include ../Makefile.inc
 
-OBJS = checkers.o readsector0.o tur.o directio.o emc_clariion.o hp_sw.o rdac.o cciss_tur.o
+OBJS = checkers.o readsector0.o tur.o directio.o emc_clariion.o hp_sw.o rdac.o cciss_tur.o hp_tur.o
 
 all: $(BUILD)
 
@@ -16,6 +16,9 @@
 glibc: $(OBJS)
 	ar rs libcheckers-glibc.a *.o
 
+hp_tur.o: tur.c
+	$(CC) $(CFLAGS) -DCHECK_WWID -c -o $@ $<
+
 install:
 
 uninstall:
libcheckers/checkers.c +21 -1
@@ -5,6 +5,7 @@
 
 #include "directio.h"
 #include "tur.h"
+#include "hp_tur.h"
 #include "hp_sw.h"
 #include "emc_clariion.h"
 #include "rdac.h"
@@ -35,6 +36,16 @@
 	{
 		.fd         = 0,
 		.sync       = 1,
+		.name       = HP_TUR,
+		.message    = "",
+		.context    = NULL,
+		.check      = hp_tur,
+		.init       = hp_tur_init,
+		.free       = hp_tur_free
+	},
+	{
+		.fd         = 0,
+		.sync       = 1,
 		.name       = HP_SW,
 		.message    = "",
 		.context    = NULL,
@@ -82,7 +93,16 @@
 		.init       = cciss_tur_init,
 		.free       = cciss_tur_free
 	},
-	{0, 1, "", "", NULL, NULL, NULL, NULL},
+	{
+		.fd         = 0,
+		.sync       = 1,
+		.name       = "",
+		.message    = "",
+		.context    = NULL,
+		.check      = NULL,
+		.init       = NULL,
+		.free       = NULL
+	},
 };
 
 void checker_set_fd (struct checker * c, int fd)
libcheckers/checkers.h +3 -0
@@ -14,6 +14,7 @@
 
 #define DIRECTIO     "directio"
 #define TUR          "tur"
+#define HP_TUR	     "hp_tur"
 #define HP_SW        "hp_sw"
 #define RDAC         "rdac"
 #define EMC_CLARIION "emc_clariion"
@@ -43,12 +44,14 @@
 #define CHECKER_NAME_LEN 16
 #define CHECKER_MSG_LEN 256
 #define CHECKER_DEV_LEN 256
+#define WWID_SIZE 128
 
 struct checker {
 	int fd;
 	int sync;
 	char name[CHECKER_NAME_LEN];
 	char message[CHECKER_MSG_LEN];       /* comm with callers */
+	char wwid[WWID_SIZE];                /* LUN wwid */
 	void * context;                      /* store for persistent data */
 	int (*check)(struct checker *);
 	int (*init)(struct checker *);       /* to allocate the context */
libcheckers/tur.c +132 -0

179 lines not on this page · raw message