[Ocfs2-tools-commits] jlbec commits r1373 - branches/cman-based/ocfs2_controld

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Jul 25 00:26:26 PDT 2007


Author: jlbec
Date: 2007-07-25 00:26:25 -0700 (Wed, 25 Jul 2007)
New Revision: 1373

Added:
   branches/cman-based/ocfs2_controld/ocfs2_controld_internal.h
Removed:
   branches/cman-based/ocfs2_controld/ocfs2_controld.h
Modified:
   branches/cman-based/ocfs2_controld/group.c
   branches/cman-based/ocfs2_controld/main.c
   branches/cman-based/ocfs2_controld/member_cman.c
Log:
Rename ocfs2_controld.h to ocfs2_controld_internal.h

Modified: branches/cman-based/ocfs2_controld/group.c
===================================================================
--- branches/cman-based/ocfs2_controld/group.c	2007-07-24 22:04:28 UTC (rev 1372)
+++ branches/cman-based/ocfs2_controld/group.c	2007-07-25 07:26:25 UTC (rev 1373)
@@ -22,7 +22,8 @@
  *  of the GNU General Public License v.2.
  */
 
-#include "ocfs2_controld.h"
+//#include "ocfs2_controld.h"
+#include "ocfs2_controld_internal.h"
 
 #define OCFS2_CONTROLD_GROUP_NAME "ocfs2"
 #define OCFS2_CONTROLD_GROUP_LEVEL 2  /* Because gfs_controld uses 2.

Modified: branches/cman-based/ocfs2_controld/main.c
===================================================================
--- branches/cman-based/ocfs2_controld/main.c	2007-07-24 22:04:28 UTC (rev 1372)
+++ branches/cman-based/ocfs2_controld/main.c	2007-07-25 07:26:25 UTC (rev 1373)
@@ -22,7 +22,8 @@
  *  of the GNU General Public License v.2.
  */
 
-#include "ocfs2_controld.h"
+//#include "ocfs2_controld.h"
+#include "ocfs2_controld_internal.h"
 
 #define OPTION_STRING			"DPhVwpl:"
 #define LOCKFILE_NAME			"/var/run/gfs_controld.pid"

Modified: branches/cman-based/ocfs2_controld/member_cman.c
===================================================================
--- branches/cman-based/ocfs2_controld/member_cman.c	2007-07-24 22:04:28 UTC (rev 1372)
+++ branches/cman-based/ocfs2_controld/member_cman.c	2007-07-25 07:26:25 UTC (rev 1373)
@@ -32,7 +32,8 @@
 #include <arpa/inet.h>
 #include <libcman.h>
 
-#include "ocfs2_controld.h"
+//#include "ocfs2_controld.h"
+#include "ocfs2_controld_internal.h"
 
 int			our_nodeid;
 char *			clustername;

Deleted: branches/cman-based/ocfs2_controld/ocfs2_controld.h
===================================================================
--- branches/cman-based/ocfs2_controld/ocfs2_controld.h	2007-07-24 22:04:28 UTC (rev 1372)
+++ branches/cman-based/ocfs2_controld/ocfs2_controld.h	2007-07-25 07:26:25 UTC (rev 1373)
@@ -1,251 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; -*-
- * vim: noexpandtab sw=8 ts=8 sts=0:
- */
-
-/******************************************************************************
-*******************************************************************************
-**
-**  Copyright (C) 2005 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
-**  of the GNU General Public License v.2.
-**
-*******************************************************************************
-******************************************************************************/
-
-/*
- * Copyright (C) 2007 Oracle.  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
- *  of the GNU General Public License v.2.
- */
-
-#ifndef __OCFS2_CONTROLD_H
-#define __OCFS2_CONTROLD_H
-
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stddef.h>
-#include <string.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <time.h>
-#include <syslog.h>
-#include <sched.h>
-#include <asm/types.h>
-#include <sys/socket.h>
-#include <sys/poll.h>
-#include <sys/un.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <sys/errno.h>
-#include <linux/netlink.h>
-
-#include "kernel-list.h"
-#include "libgroup.h"
-
-#define MAXARGS			16
-#define MAXLINE			256
-#define MAXNAME			255
-#define MAX_CLIENTS		8
-#define MAX_MSGLEN		2048
-#define MAX_OPTIONS_LEN		1024
-#define DUMP_SIZE		(1024 * 1024)
-
-#define OCFS2_CONTROLD_SOCK_PATH	"ocfs2_controld_sock"
-
-#ifndef TRUE
-#define TRUE (1)
-#endif
-#ifndef FALSE
-#define FALSE (0)
-#endif
-
-enum {
-	DO_STOP = 1,
-	DO_START,
-	DO_FINISH,
-	DO_TERMINATE,
-	DO_SETID,
-	DO_DELIVER,
-};
-
-extern char *prog_name;
-extern int daemon_debug_opt;
-extern char daemon_debug_buf[256];
-extern char dump_buf[DUMP_SIZE];
-extern int dump_point;
-extern int dump_wrap;
-
-extern void daemon_dump_save(void);
-
-#define log_debug(fmt, args...) \
-do { \
-	snprintf(daemon_debug_buf, 255, "%ld " fmt "\n", time(NULL), ##args); \
-	if (daemon_debug_opt) fprintf(stderr, "%s", daemon_debug_buf); \
-	daemon_dump_save(); \
-} while (0)
-
-#define log_group(g, fmt, args...) \
-do { \
-	snprintf(daemon_debug_buf, 255, "%ld %s " fmt "\n", time(NULL), \
-		 (g)->name, ##args); \
-	if (daemon_debug_opt) fprintf(stderr, "%s", daemon_debug_buf); \
-	daemon_dump_save(); \
-} while (0)
-
-#define log_plock(g, fmt, args...) \
-do { \
-	snprintf(daemon_debug_buf, 255, "%ld %s " fmt "\n", time(NULL), \
-		 (g)->name, ##args); \
-	if (plock_debug_opt) fprintf(stderr, "%s", daemon_debug_buf); \
-} while (0)
-
-#define log_error(fmt, args...) \
-do { \
-	log_debug(fmt, ##args); \
-	syslog(LOG_ERR, fmt, ##args); \
-} while (0)
-
-#define ASSERT(x) \
-{ \
-	if (!(x)) { \
-		fprintf(stderr, "\nAssertion failed on line %d of file %s\n\n" \
-			"Assertion:  \"%s\"\n", \
-			__LINE__, __FILE__, #x); \
-        } \
-}
-
-struct mountpoint {
-	struct list_head	list;
-	char			dir[PATH_MAX+1];
-	int			client;
-};
-
-struct mountgroup {
-	struct list_head	list;
-	uint32_t		id;
-	struct list_head	members;
-	struct list_head	members_gone;
-	int			memb_count;
-	struct list_head	resources; /* for plocks */
-	struct list_head	mountpoints;
-
-	char			name[MAXNAME+1];
-	char			table[MAXNAME+1];
-	char			type[5];
-	char			options[MAX_OPTIONS_LEN+1];
-	char			dev[PATH_MAX+1];
-
-	int			last_stop;
-	int			last_start;
-	int			last_finish;
-	int			last_callback;
-	int			start_event_nr;
-	int			start_type;
-
-	char			error_msg[128];
-	int			mount_client;
-	int			mount_client_fd;
-	int			mount_client_notified;
-	int			mount_client_delay;
-	int                     group_leave_on_finish;
-	int			remount_client;
-	int			init;
-	int			got_our_options;
-	int			got_our_journals;
-	int			delay_send_journals;
-	int			kernel_mount_error;
-	int			kernel_mount_done;
-	int			got_kernel_mount;
-
-	int			spectator;
-	int			readonly;
-	int			rw;
-
-	struct list_head	saved_messages;
-	void			*start2_fn;
-};
-
-/* mg_member opts bit field */
-
-enum {
-	MEMB_OPT_RW		= 1,
-	MEMB_OPT_RO		= 2,
-	MEMB_OPT_SPECT		= 4,
-	MEMB_OPT_RECOVER	= 8,
-};
-
-/* these need to match the kernel defines of the same name in
-   linux/fs/gfs2/lm_interface.h */
-
-#define LM_RD_GAVEUP 308
-#define LM_RD_SUCCESS 309
-
-/* mg_member state: local_recovery_status, recovery_status */
-
-enum {
-	RS_NEED_RECOVERY = 1,
-	RS_SUCCESS,
-	RS_GAVEUP,
-	RS_NOFS,
-	RS_READONLY,
-};
-
-struct mg_member {
-	struct list_head	list;
-	int			nodeid;
-
-	int			spectator;
-	int			readonly;
-	int			rw;
-	uint32_t		opts;
-
-	int			gone_event;
-	int			gone_type;
-	int			finished;
-
-	int			ms_kernel_mount_done;
-	int			ms_kernel_mount_error;
-};
-
-enum {
-	MSG_JOURNAL = 1,
-	MSG_OPTIONS,
-	MSG_REMOUNT,
-	MSG_PLOCK,
-	MSG_WITHDRAW,
-	MSG_MOUNT_STATUS,
-	MSG_RECOVERY_STATUS,
-	MSG_RECOVERY_DONE,
-};
-
-
-int do_read(int fd, void *buf, size_t count);
-int do_write(int fd, void *buf, size_t count);
-struct mountgroup *find_mg(char *name);
-struct mountgroup *find_mg_id(uint32_t id);
-
-int setup_cman(void);
-int process_cman(void);
-int setup_groupd(void);
-int process_groupd(void);
-void exit_cman(void);
-
-int do_mount(int ci, char *dir, char *type, char *proto, char *table,
-	     char *options, char *dev, struct mountgroup **mg_ret);
-int do_unmount(int ci, char *dir, int mnterr);
-int do_remount(int ci, char *dir, char *mode);
-void ping_kernel_mount(char *table);
-void got_mount_result(struct mountgroup *mg, int result, int ci, int another);
-
-int client_send(int ci, char *buf, int len);
-
-void update_flow_control_status(void);
-
-#endif

Copied: branches/cman-based/ocfs2_controld/ocfs2_controld_internal.h (from rev 1370, branches/cman-based/ocfs2_controld/ocfs2_controld.h)




More information about the Ocfs2-tools-commits mailing list