Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > a83160a857a2d32e2b2b3f71cd4279d2 > files > 10

cmirror-1.1.39-13.el5.src.rpm

--- cmirror-1.1.39/configure.fixbuild	2009-07-27 15:11:42.000000000 -0500
+++ cmirror-1.1.39/configure	2009-12-22 12:58:46.882949475 -0600
@@ -92,14 +92,14 @@ open OFILE, ">make/defines.mk" or die "C
 
 print OFILE "# This file was generated by configure from defines.mk.input\n";
 
-open VER, "<$kernel_src/include/linux/version.h" or die "Can't open $kernel_src/include/linux/version.h";
-while(<VER>){
-    chomp;
-    if( $_ =~ /^#define\s*UTS_RELEASE\s*\"(.*)\"$/ ){
-      $kernel_version = $1;
-      $module_dir = "${prefix}/lib/modules/$1/kernel";
-    }
-}
+#open VER, "<$kernel_src/include/linux/version.h" or die "Can't open $kernel_src/include/linux/version.h";
+#while(<VER>){
+#    chomp;
+#    if( $_ =~ /^#define\s*UTS_RELEASE\s*\"(.*)\"$/ ){
+#      $kernel_version = $1;
+#      $module_dir = "${prefix}/lib/modules/$1/kernel";
+#    }
+#}
 
 while (<IFILE>) {
   chomp;
--- cmirror-1.1.39/src/Makefile.fixbuild	2009-07-27 15:11:42.000000000 -0500
+++ cmirror-1.1.39/src/Makefile	2009-12-22 12:58:46.882949475 -0600
@@ -17,19 +17,21 @@ include ${top_srcdir}/make/defines.mk
 
 TARGET=clogd
 
-TMP_INCLUDE = $(shell if [ -e ${KERNEL_SRC}/include/linux/dm-clog-tfr.h ]; then \
-	echo '-I${KERNEL_SRC}/include'; \
-	elif [ -e ${incdir}/linux/dm-clog-tfr.h ]; then \
-	echo '-I${incdir}'; else \
-	echo ''; fi)
+#TMP_INCLUDE = $(shell if [ -e ${KERNEL_SRC}/include/linux/dm-clog-tfr.h ]; then \
+#	echo '-I${KERNEL_SRC}/include'; \
+#	elif [ -e ${incdir}/linux/dm-clog-tfr.h ]; then \
+#	echo '-I${incdir}'; else \
+#	echo ''; fi)
 
 SOURCES = clogd.c cluster.c functions.c link_mon.c local.c logging.c
 
-ifneq (${TMP_INCLUDE}, )
-INCLUDE += ${TMP_INCLUDE} -I.
-else
-TARGET=no_files
-endif
+#ifneq (${TMP_INCLUDE}, )
+#INCLUDE += ${TMP_INCLUDE} -I.
+#else
+#TARGET=no_files
+#endif
+
+INCLUDE += -I.
 
 ifneq ($(DEBUG), )
 CFLAGS += -DDEBUG
--- cmirror-1.1.39/src/linux/dm-clog-tfr.h.fixbuild	2009-12-22 12:58:46.882949475 -0600
+++ cmirror-1.1.39/src/linux/dm-clog-tfr.h	2009-12-22 12:58:58.162949660 -0600
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2006 Red Hat, Inc.
+ *
+ * This file is released under the LGPL.
+ */
+
+#ifndef __DM_CLOG_TFR_H__
+#define __DM_CLOG_TFR_H__
+
+#include <linux/dm-ioctl.h> /* For DM_UUID_LEN */
+
+#define DM_CLOG_TFR_SIZE 1024
+
+#define DM_CLOG_CTR                    1
+#define DM_CLOG_DTR                    2
+#define DM_CLOG_PRESUSPEND             3
+#define DM_CLOG_POSTSUSPEND            4
+#define DM_CLOG_RESUME                 5
+#define DM_CLOG_GET_REGION_SIZE        6
+#define DM_CLOG_IS_CLEAN               7
+#define DM_CLOG_IN_SYNC                8
+#define DM_CLOG_FLUSH                  9
+#define DM_CLOG_MARK_REGION           10
+#define DM_CLOG_CLEAR_REGION          11
+#define DM_CLOG_GET_RESYNC_WORK       12
+#define DM_CLOG_SET_REGION_SYNC       13
+#define DM_CLOG_GET_SYNC_COUNT        14
+#define DM_CLOG_STATUS_INFO           15
+#define DM_CLOG_STATUS_TABLE          16
+#define DM_CLOG_IS_REMOTE_RECOVERING  17
+
+#define RQ_TYPE(x) \
+	((x) == DM_CLOG_CTR) ? "DM_CLOG_CTR" : \
+	((x) == DM_CLOG_DTR) ? "DM_CLOG_DTR" : \
+	((x) == DM_CLOG_PRESUSPEND) ? "DM_CLOG_PRESUSPEND" : \
+	((x) == DM_CLOG_POSTSUSPEND) ? "DM_CLOG_POSTSUSPEND" : \
+	((x) == DM_CLOG_RESUME) ? "DM_CLOG_RESUME" : \
+	((x) == DM_CLOG_GET_REGION_SIZE) ? "DM_CLOG_GET_REGION_SIZE" : \
+	((x) == DM_CLOG_IS_CLEAN) ? "DM_CLOG_IS_CLEAN" : \
+	((x) == DM_CLOG_IN_SYNC) ? "DM_CLOG_IN_SYNC" : \
+	((x) == DM_CLOG_FLUSH) ? "DM_CLOG_FLUSH" : \
+	((x) == DM_CLOG_MARK_REGION) ? "DM_CLOG_MARK_REGION" : \
+	((x) == DM_CLOG_CLEAR_REGION) ? "DM_CLOG_CLEAR_REGION" : \
+	((x) == DM_CLOG_GET_RESYNC_WORK) ? "DM_CLOG_GET_RESYNC_WORK" : \
+	((x) == DM_CLOG_SET_REGION_SYNC) ? "DM_CLOG_SET_REGION_SYNC" : \
+	((x) == DM_CLOG_GET_SYNC_COUNT) ? "DM_CLOG_GET_SYNC_COUNT" : \
+	((x) == DM_CLOG_STATUS_INFO) ? "DM_CLOG_STATUS_INFO" : \
+	((x) == DM_CLOG_STATUS_TABLE) ? "DM_CLOG_STATUS_TABLE" : \
+	((x) == DM_CLOG_IS_REMOTE_RECOVERING) ? \
+	"DM_CLOG_IS_REMOTE_RECOVERING" : NULL
+
+#define CLOG_TFR_VERSION 4
+
+struct clog_tfr {
+	uint64_t private[2];
+	char uuid[DM_UUID_LEN]; /* Ties a request to a specific mirror log */
+	char uuid_padding[3];   /* DM_UUID_LEN == 129 */
+	uint32_t uuid_instance; /* Allows more than one instance w/ same uuid */
+
+	int32_t error;              /* Used by server to inform of errors */
+	uint32_t originator;    /* Cluster ID of this machine */
+
+	uint32_t seq;           /* Sequence number for request */
+	uint32_t request_type;  /* DM_CLOG_* */
+	uint64_t data_size;     /* How much data (not including this struct) */
+	char data[0];
+};
+
+#ifdef __KERNEL__
+#define DM_MSG_PREFIX "dm-log-clustered"
+
+int dm_clog_tfr_init(void);
+void dm_clog_tfr_exit(void);
+int dm_clog_consult_server(const char *uuid, uint32_t uuid_instance,
+			   int request_type,
+			   char *data, int data_size,
+			   char *rdata, int *rdata_size);
+#endif
+
+#endif /* __DM_CLOG_TFR_H__ */