[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] Cluster Project branch, STABLE2, updated. gfs-kernel_0_1_22-44-g1f0985d



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=1f0985dfe6d4d79a539abbe4a681c10296837d91

The branch, STABLE2 has been updated
       via  1f0985dfe6d4d79a539abbe4a681c10296837d91 (commit)
      from  9e71edd75f382449fabd241962b07e3536725427 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1f0985dfe6d4d79a539abbe4a681c10296837d91
Author: Christine Caulfield <ccaulfie redhat com>
Date:   Thu Mar 6 15:29:06 2008 +0000

    Make cman work with openais trunk or whitetank branch.
    
    By default cman will require the trunk of openais,
    but uncommenting a line in the Makefile will allow it
    to work with the whitetank branch instead.
    
    Someone who understands the make system might like
    to add this to ./configure.

-----------------------------------------------------------------------

Summary of changes:
 cman/daemon/Makefile   |    1 +
 cman/daemon/ais.c      |    3 +--
 cman/daemon/commands.c |    1 -
 cman/daemon/logging.c  |   34 +++++++++++++++++++++++++++++++++-
 cman/daemon/logging.h  |   16 +++++++++++++++-
 5 files changed, 50 insertions(+), 5 deletions(-)

diff --git a/cman/daemon/Makefile b/cman/daemon/Makefile
index d32f7bb..ff169e1 100644
--- a/cman/daemon/Makefile
+++ b/cman/daemon/Makefile
@@ -26,6 +26,7 @@ CFLAGS += -DOPENAIS_EXTERNAL_SERVICE
 CFLAGS += -fPIC
 CFLAGS += -I${ccsincdir} -I${openaisincdir}
 CFLAGS += -I${incdir}
+#CFLAGS += -DOPENAIS_WHITETANK
 
 LDFLAGS += -L${ccslibdir} -lccs 
 
diff --git a/cman/daemon/ais.c b/cman/daemon/ais.c
index 286fd15..6f81453 100644
--- a/cman/daemon/ais.c
+++ b/cman/daemon/ais.c
@@ -37,7 +37,6 @@
 #include <openais/service/config.h>
 #include <openais/lcr/lcr_comp.h>
 #include <openais/service/swab.h>
-#include <openais/service/logsys.h>
 
 #include "list.h"
 #include "cnxman-socket.h"
@@ -139,7 +138,7 @@ static inline void objdb_get_int(struct objdb_iface_ver0 *objdb, unsigned int ob
  * Exports the interface for the service
  */
 static struct openais_service_handler cman_service_handler = {
-	.name		    		= (char *)"openais CMAN membership service 2.01",
+	.name		    		= (unsigned char *)"openais CMAN membership service 2.01",
 	.id			        = CMAN_SERVICE,
 	.flow_control			= OPENAIS_FLOW_CONTROL_NOT_REQUIRED,
 	.lib_exit_fn		       	= cman_exit_fn,
diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index e090674..4696047 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -34,7 +34,6 @@
 #include <openais/totem/totemip.h>
 #include <openais/totem/totempg.h>
 #include <openais/service/swab.h>
-#include <openais/service/logsys.h>
 #include <openais/service/timer.h>
 #include <openais/totem/aispoll.h>
 #include "list.h"
diff --git a/cman/daemon/logging.c b/cman/daemon/logging.c
index 782a573..f7c626c 100644
--- a/cman/daemon/logging.c
+++ b/cman/daemon/logging.c
@@ -20,8 +20,11 @@
 #include <sys/time.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
-
+#ifndef OPENAIS_WHITETANK
 #include <openais/service/logsys.h>
+#else
+#include <openais/service/objdb.h>
+#endif
 #include "list.h"
 #include "cnxman-socket.h"
 #include "cnxman-private.h"
@@ -35,3 +38,32 @@ void set_debuglog(int subsystems)
 {
 	subsys_mask = subsystems;
 }
+
+#ifdef OPENAIS_WHITETANK
+void set_logger_level(struct objdb_iface_ver0 *objdb, char *ident, int level)
+{
+	unsigned int object_handle;
+	unsigned int logger_object_handle;
+
+	fprintf(stderr, "CC: setting logger levels\n");
+	objdb->object_find_reset(OBJECT_PARENT_HANDLE);
+	if (objdb->object_find(OBJECT_PARENT_HANDLE,
+			       "logging", strlen("logging"),
+			       &object_handle)) {
+
+		objdb->object_create (OBJECT_PARENT_HANDLE, &object_handle,
+				      "logging", strlen("logging"));
+	}
+
+	objdb->object_key_create(object_handle, "to_stderr", strlen("to_stderr"),
+				 "yes", strlen("yes")+1);
+
+	objdb->object_create (object_handle, &logger_object_handle,
+			      "logger", strlen("logger"));
+
+	objdb->object_key_create(logger_object_handle, "ident", strlen("ident"),
+				 ident, strlen(ident)+1);
+	objdb->object_key_create(logger_object_handle, "debug", strlen("debug"),
+				 "on", strlen("on")+1);
+}
+#endif
diff --git a/cman/daemon/logging.h b/cman/daemon/logging.h
index dcb7932..83ceca2 100644
--- a/cman/daemon/logging.h
+++ b/cman/daemon/logging.h
@@ -9,7 +9,21 @@
 **
 *******************************************************************************
 ******************************************************************************/
+#ifdef OPENAIS_WHITETANK
+#include <openais/service/print.h>
+#include <openais/service/objdb.h>
+
+#define LOGSYS_DECLARE_SUBSYS(subsys,priority)                          \
+__attribute__ ((constructor)) static void logsys_subsys_init (void)     \
+{                                                                       \
+	log_init(subsys);						\
+}
+void set_logger_level(struct objdb_iface_ver0 *objdb, char *ident, int level);
+#define logsys_config_subsys_set(x,y,z) set_logger_level(global_objdb, x, z)
+
+#else
 #include <openais/service/logsys.h>
+#endif
 
 extern void set_debuglog(int subsystems);
 
@@ -22,7 +36,7 @@ extern void set_debuglog(int subsystems);
 
 extern int subsys_mask;
 
-#define P_BARRIER(fmt, args...) if (subsys_mask & CMAN_DEBUG_BARRIER) log_printf(logsys_mkpri(LOG_LEVEL_DEBUG, logsys_subsys_id), "barrier: " fmt, ## args)
+#define P_BARRIER(fmt, args...) if (subsys_mask & CMAN_DEBUG_BARRIER) log_printf(LOG_LEVEL_DEBUG , "barrier: " fmt, ## args)
 #define P_MEMB(fmt, args...)    if (subsys_mask & CMAN_DEBUG_MEMB) log_printf(LOG_LEVEL_DEBUG , "memb: " fmt, ## args)
 #define P_DAEMON(fmt, args...)  if (subsys_mask & CMAN_DEBUG_DAEMON) log_printf(LOG_LEVEL_DEBUG , "daemon: " fmt, ## args)
 #define P_AIS(fmt, args...)     if (subsys_mask & CMAN_DEBUG_AIS) log_printf(LOG_LEVEL_DEBUG, "ais " fmt, ## args)


hooks/post-receive
--
Cluster Project


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]