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 41f2735e80acff590c08161e76ce0d25ca5e9c66 (commit)
from 4e449d4110b416a7c1da8eb2cca3e81338085db5 (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 41f2735e80acff590c08161e76ce0d25ca5e9c66
Author: David Teigland <teigland@redhat.com>
Date: Thu May 1 16:02:37 2008 -0500
dlm_controld: filling out code
Filling in various unfinished bits, fixing up wrong/inconsistent
header length (also in fenced).
Signed-off-by: David Teigland <teigland@redhat.com>
-int dlmc_lockspace_nodes(char *name, int type, int max, int *count, struct dlmc_node *nodes)
+int dlmc_lockspace_nodes(char *name, int type, int max, int *count,
+ struct dlmc_node *nodes)
{
struct dlmc_header h, *rh;
char *reply;
int reply_len;
int fd, rv, result, node_count;
fd = do_connect(DLMC_SOCK_PATH);
if (fd < 0) {
diff --git a/fence/fenced/main.c b/fence/fenced/main.c
index aec8f2c..a94bb85 100644
--- a/fence/fenced/main.c
+++ b/fence/fenced/main.c
@@ -263,47 +263,57 @@ static int do_external(char *name, char *extra, int extra_len)
return rv;
}
+static void init_header(struct fenced_header *h, int cmd, int result,
+ int extra_len)
+{
+ memset(h, 0, sizeof(struct fenced_header));
+
+ h->magic = FENCED_MAGIC;
+ h->version = FENCED_VERSION;
+ h->len = sizeof(struct fenced_header) + extra_len;
+ h->command = cmd;
+ h->data = result;
+}
+
/* combines a header and the data and sends it back to the client in
a single do_write() call */
-static void do_reply(int f, int cmd, int result, char *buf, int len)
+static void do_reply(int f, int cmd, int result, char *buf, int buflen)
{
- struct fenced_header *rh;
char *reply;
int reply_len;
-/* dump can do 1, 2, or 3 separate writes:
- first write is the header,
- second write is the tail of log,
- third is the head of the log */
-
static void query_dump_debug(int f)
{
+ struct fenced_header h;
+ int extra_len;
int len;
- do_reply(f, FENCED_CMD_DUMP_DEBUG, 0, NULL, 0);
+ /* in the case of dump_wrap, extra_len will go in two writes,
+ first the log tail, then the log head */
+ if (dump_wrap)
+ extra_len = FENCED_DUMP_SIZE;
+ else
+ extra_len = dump_point;
+
+ init_header(&h, FENCED_CMD_DUMP_DEBUG, 0, extra_len);
+ do_write(f, &h, sizeof(h));
if (dump_wrap) {
len = FENCED_DUMP_SIZE - dump_point;
diff --git a/fence/libfenced/main.c b/fence/libfenced/main.c
index 4f2a310..89d81d5 100644
--- a/fence/libfenced/main.c
+++ b/fence/libfenced/main.c
@@ -83,13 +83,13 @@ static int do_connect(char *sock_path)
return fd;
}
-static void init_header(struct fenced_header *h, int cmd, int len)
+static void init_header(struct fenced_header *h, int cmd, int extra_len)
{
memset(h, 0, sizeof(struct fenced_header));
diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c
index 59872d7..b9c9dee 100644
--- a/group/dlm_controld/cpg.c
+++ b/group/dlm_controld/cpg.c
@@ -36,7 +36,7 @@ struct node {
int check_fencing;
int check_quorum;
int check_fs;
- int fs_notify;
+ int fs_notified;
uint64_t add_time;
};
@@ -442,7 +442,7 @@ static int check_fs_done(struct lockspace *ls)
if (!node->check_fs)
continue;
- if (node->fs_notify) {
+ if (node->fs_notified) {
node->check_fs = 0;
} else {
log_group(ls, "check_fs %d needs fs notify",
@@ -1439,3 +1439,40 @@ int setup_cpg(void)
return 0;
}
+/* fs_controld has seen nodedown for nodeid; it's now ok for dlm to do
+ recovery for the failed node */
+
+int set_fs_notified(struct lockspace *ls, int nodeid)
+{
+ struct node *node;
+
+ /* this shouldn't happen */
+ node = get_node_history(ls, nodeid);
+ if (!node)
+ return -ESRCH;
+
+ /* this can happen, we haven't seen a nodedown for this node yet,
+ but we should soon */
+ if (!node->check_fs)
+ return -EAGAIN;
+
+ node->fs_notified = 1;
+ return 0;
+}
+
+int set_node_info(struct lockspace *ls, int nodeid, struct dlmc_node *node)
+{
+ return 0;
+}
+
+int set_lockspace_info(struct lockspace *ls, struct dlmc_lockspace *lockspace)
+{
+ return 0;
+}
+
+int set_lockspace_nodes(struct lockspace *ls, int option, int *node_count,
+ struct dlmc_node **nodes)
+{
+ return 0;
+}
+
diff --git a/group/dlm_controld/dlm_daemon.h b/group/dlm_controld/dlm_daemon.h
index e1930b8..370989a 100644
--- a/group/dlm_controld/dlm_daemon.h
+++ b/group/dlm_controld/dlm_daemon.h
@@ -86,6 +86,8 @@ extern char daemon_debug_buf[256];
extern char dump_buf[DLMC_DUMP_SIZE];
extern int dump_point;
extern int dump_wrap;
+extern char plock_dump_buf[DLMC_DUMP_SIZE];
+extern int plock_dump_len;
void daemon_dump_save(void);
@@ -202,7 +204,7 @@ int set_sysfs_control(char *name, int val);
int set_sysfs_event_done(char *name, int val);
int set_sysfs_id(char *name, uint32_t id);
int set_configfs_members(char *name, int new_count, int *new_members,
- int renew_count, int *renew_members);
+ int renew_count, int *renew_members);
void clear_configfs(void);
int add_configfs_node(int nodeid, char *addr, int addrlen, int local);
void del_configfs_node(int nodeid);
@@ -218,12 +220,17 @@ int dlm_join_lockspace(struct lockspace *ls);
int dlm_leave_lockspace(struct lockspace *ls);
char *msg_name(int type);
void update_flow_control_status(void);
+int set_node_info(struct lockspace *ls, int nodeid, struct dlmc_node *node);
+int set_lockspace_info(struct lockspace *ls, struct dlmc_lockspace *lockspace);
+int set_lockspace_nodes(struct lockspace *ls, int option, int *node_count,
+ struct dlmc_node **nodes);
+int set_fs_notified(struct lockspace *ls, int nodeid);