Cluster Project branch, master, updated. cluster-2.99.00-5-g91a32ad
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".
The branch, master has been updated
via 91a32add490287c17a1aef64b0f3eb356c092a5d (commit)
from b90340dcfc70b96388cd113487269c80031bd2f1 (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 91a32add490287c17a1aef64b0f3eb356c092a5d
Author: David Teigland <[email protected]> Date: Tue Apr 29 16:28:42 2008 -0500
libdlmcontrol: new lib interface to dlm_controld
Adds all the structure, most of the calls do nothing yet.
-----------------------------------------------------------------------
Summary of changes:
{fence/libfenced => dlm/libdlmcontrol}/Makefile | 5 +-
.../libdlmcontrol/libdlmcontrol.h | 59 ++++---
{fence/libfenced => dlm/libdlmcontrol}/main.c | 153 +++++----------
dlm/tool/Makefile | 5 +-
dlm/tool/main.c | 49 +-----
fence/fenced/fd.h | 6 +-
fence/fenced/main.c | 6 +-
group/dlm_controld/Makefile | 2 +-
group/dlm_controld/action.c | 2 +-
group/dlm_controld/dlm_controld.h | 34 +++-
group/dlm_controld/dlm_daemon.h | 21 +--
group/dlm_controld/group.c | 2 +-
group/dlm_controld/main.c | 194 ++++++++++++++++----
13 files changed, 303 insertions(+), 235 deletions(-)
copy {fence/libfenced => dlm/libdlmcontrol}/Makefile (93%)
copy fence/libfenced/libfenced.h => dlm/libdlmcontrol/libdlmcontrol.h (51%)
copy {fence/libfenced => dlm/libdlmcontrol}/main.c (55%)dlm/libdlmcontrol/Makefile renamed from fence/libfenced/Makefile +3 -2
@@ -10,7 +10,7 @@ ############################################################################### ############################################################################### -TARGET= libfenced +TARGET= libdlmcontrol LIBDIRT=$(TARGET).a \ $(TARGET).so.$(SOMAJOR).$(SOMINOR)
@@ -35,8 +35,9 @@ include $(OBJDIR)/make/uninstall.mk OBJS= main.o CFLAGS += -fPIC -CFLAGS += -I$(S)/../fenced +CFLAGS += -I$(S)/../../group/dlm_controld CFLAGS += -I${incdir} +CFLAGS += -I$(KERNEL_SRC)/include $(TARGET).a: $(OBJS) ${AR} r $@ $^
dlm/libdlmcontrol/libdlmcontrol.h renamed from fence/libfenced/libfenced.h +35 -24
74 lines not on this page · raw message
dlm/libdlmcontrol/main.c renamed from fence/libfenced/main.c +51 -102
271 lines not on this page · raw message
dlm/tool/Makefile +3 -2
@@ -26,9 +26,10 @@ OBJS= main.o CFLAGS += -I${dlmincdir} CFLAGS += -I$(SRCDIR)/group/dlm_controld/ -CFLAGS += -I${incdir} +CFLAGS += -I${incdir} -I../libdlmcontrol +CFLAGS += -I${KERNEL_SRC}/include/ -LDFLAGS += -L${dlmlibdir} -ldlm +LDFLAGS += -L${dlmlibdir} -L../libdlmcontrol -ldlm -ldlmcontrol ${TARGET}: ${OBJS}
dlm/tool/main.c +4 -45
70 lines not on this page · raw message
fence/fenced/fd.h +1 -5
@@ -65,10 +65,6 @@#define MAXLINE 256 -/* Size of the circular debug buffer. */ - -#define DUMP_SIZE (1024 * 1024) -/* group_mode */ #define GROUP_LIBGROUP 2
@@ -81,7 +77,7 @@ extern int cman_quorate;extern int our_nodeid;extern char our_name[MAX_NODENAME_LEN +1 ];extern char daemon_debug_buf[256 ]; -extern char dump_buf[DUMP_SIZE ]; +extern char dump_buf[FENCED_DUMP_SIZE ];extern int dump_point;extern int dump_wrap;extern int group_mode;
fence/fenced/main.c +3 -3
@@ -306,7 +306,7 @@ static void query_dump_debug(int f)do_reply (f,FENCED_CMD_DUMP_DEBUG ,0 ,NULL ,0 );if (dump_wrap) { - len =DUMP_SIZE - dump_point; + len =FENCED_DUMP_SIZE - dump_point;do_write (f, dump_buf + dump_point, len); len = dump_point; }else
@@ -883,7 +883,7 @@ void daemon_dump_save(void)for (i =0 ; i < len; i++) { dump_buf[dump_point++] = daemon_debug_buf[i]; -if (dump_point ==DUMP_SIZE ) { +if (dump_point ==FENCED_DUMP_SIZE ) { dump_point =0 ; dump_wrap =1 ; }
@@ -897,7 +897,7 @@ int cman_quorate;int our_nodeid;char our_name[MAX_NODENAME_LEN +1 ];char daemon_debug_buf[256 ]; -char dump_buf[DUMP_SIZE ]; +char dump_buf[FENCED_DUMP_SIZE ];int dump_point;int dump_wrap;int group_mode;
group/dlm_controld/Makefile +1 -1
@@ -36,7 +36,7 @@ OBJS= action.o \ CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${dlmincdir} -I${openaisincdir} -I${fencedincdir} CFLAGS += -I${KERNEL_SRC}/include/ CFLAGS += -I$(S)/../lib/ -I$(S)/../include/ -CFLAGS += -I${incdir} +CFLAGS += -I${incdir} -I../../dlm/libdlmcontrol/ LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -L${dlmlibdir} -L${fencedlibdir} -lccs -lcman -ldlm -lfenced LDFLAGS += -L${openaislibdir} -lcpg -lSaCkpt
group/dlm_controld/action.c +1 -1
@@ -17,7 +17,7 @@ static int dir_members[MAX_NODES];static int dir_members_count;static int comms_nodes[MAX_NODES ];static int comms_nodes_count; -static char mg_name[MAX_LS_NAME +1 ]; +static char mg_name[DLM_LOCKSPACE_LEN +1 ];#define DLM_SYSFS_DIR "/sys/kernel/dlm"#define CLUSTER_DIR "/sys/kernel/config/dlm/cluster"
group/dlm_controld/dlm_controld.h +31 -3
@@ -1,7 +1,7 @@/****************************************************************************** ******************************************************************************* ** -** Copyright (C) 2007 Red Hat, Inc. All rights reserved. +** Copyright (C) 2007-2008 Red Hat, Inc. All rights reserved. ** ** This copyrighted material is made available to anyone wishing to use, ** modify, copy, or redistribute it subject to the terms and conditions
@@ -13,8 +13,36 @@#ifndef __DLM_CONTROLD_DOT_H__#define __DLM_CONTROLD_DOT_H__ -#define DLM_CONTROLD_SOCK_PATH "dlm_controld_socket" -#define DLM_CONTROLD_MSGLEN 256 +/* This defines the interface between dlm_controld and libdlmcontrol, and +should only be used by libdlmcontrol. */ + +#define DLMC_SOCK_PATH "dlmc_sock" +#define DLMC_QUERY_SOCK_PATH "dlmc_query_sock" + +#define DLMC_MAGIC 0xD13CD13C +#define DLMC_VERSION 0x00010001 + +#define DLMC_CMD_DUMP_DEBUG 1 +#define DLMC_CMD_DUMP_PLOCKS 2 +#define DLMC_CMD_NODE_INFO 3 +#define DLMC_CMD_LOCKSPACE_INFO 4 +#define DLMC_CMD_LOCKSPACE_NODES 5 +#define DLMC_CMD_FS_REGISTER 6 +#define DLMC_CMD_FS_UNREGISTER 7 +#define DLMC_CMD_FS_NOTIFIED 8 +#define DLMC_CMD_DEADLK_CHECK 9 + +struct dlmc_header { +unsigned int magic; +unsigned int version; +unsigned int command; +unsigned int option; +unsigned int len; +int data;/* embedded command-specific data, for convenience */ +int unused1; +int unsued2; +char name[DLM_LOCKSPACE_LEN ];/* no terminating null space */ +};#endif
group/dlm_controld/dlm_daemon.h +8 -13
@@ -42,21 +42,20 @@#include <signal.h> #include <sys/time.h> #include <dirent.h> -#include <openais/saAis.h> #include <openais/saCkpt.h> #include <openais/cpg.h> +#include <linux/dlmconstants.h> +#include "libdlmcontrol.h" #include "dlm_controld.h" #include "list.h" #include "linux_endian.h" -/* Maximum lockspace name length, should match MAX_LOCKSPACE_NAME in -linux/dlmconstants.h (copied in libdlm.h). The libcpg limit is -larger at CPG_MAX_NAME_LENGTH 128. Our cpg name includes a "dlm:" -prefix before the lockspace name. */ - -#define MAX_LS_NAME 64 +/* DLM_LOCKSPACE_LEN: maximum lockspace name length, from linux/dlmconstants.h. +Copied in libdlm.h so apps don't need to include the kernel header. +The libcpg limit is larger at CPG_MAX_NAME_LENGTH 128. Our cpg name includes +a "dlm:" prefix before the lockspace name. */ /* Maximum members of a lockspace, should match CPG_MEMBERS_MAX in openais/cpg.h. There are no max defines in dlm-kernel for lockspace members. */
@@ -72,10 +71,6 @@#define MAXLINE 256 -/* Size of the circular debug buffer. */ - -#define DUMP_SIZE (1024 * 1024) -extern int daemon_debug_opt;extern int daemon_quit;extern int poll_fencing;
@@ -88,7 +83,7 @@ extern struct list_head lockspaces;extern int cman_quorate;extern int our_nodeid;extern char daemon_debug_buf[256 ]; -extern char dump_buf[DUMP_SIZE ]; +extern char dump_buf[DLMC_DUMP_SIZE ];extern int dump_point;extern int dump_wrap;
@@ -156,7 +151,7 @@ struct dlm_header {struct lockspace {struct list_head list; -char name[MAX_LS_NAME +1 ]; +char name[DLM_LOCKSPACE_LEN +1 ];uint32_t global_id;/* lockspace membership stuff */
group/dlm_controld/group.c +1 -1
@@ -26,7 +26,7 @@group_handle_t gh;static int cb_action; -static char cb_name[MAX_LS_NAME +1 ]; +static char cb_name[DLM_LOCKSPACE_LEN +1 ];static int cb_event_nr;static unsigned int cb_id;static int cb_type;
group/dlm_controld/main.c +161 -33
277 lines not on this page · raw message
hooks/post-receive
--
Cluster Project