From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/group/gfs_controld cpg.c
Date: 30 Nov 2006 19:50:20 -0000 [thread overview]
Message-ID: <20061130195020.30764.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL50
Changes by: teigland at sourceware.org 2006-11-30 19:50:20
Modified files:
group/gfs_controld: cpg.c
Log message:
From: Steven Dake
We dispatch in the dispatch handler now instead of saving the
data. Also we use dispatch all which will basically try to dispatch all
messages possible in one go instead of only dispatching on each loop
through poll.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/cpg.c.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.9.4.1&r2=1.9.4.2
--- cluster/group/gfs_controld/cpg.c 2006/11/20 21:10:36 1.9.4.1
+++ cluster/group/gfs_controld/cpg.c 2006/11/30 19:50:20 1.9.4.2
@@ -15,10 +15,6 @@
static cpg_handle_t daemon_handle;
static struct cpg_name daemon_name;
-static int got_msg;
-static int saved_nodeid;
-static int saved_len;
-static char saved_data[MAX_MSGLEN];
int message_flow_control_on;
void receive_journals(struct mountgroup *mg, char *buf, int len, int from);
@@ -113,10 +109,7 @@
void deliver_cb(cpg_handle_t handle, struct cpg_name *group_name,
uint32_t nodeid, uint32_t pid, void *data, int data_len)
{
- saved_nodeid = nodeid;
- saved_len = data_len;
- memcpy(saved_data, data, data_len);
- got_msg = 1;
+ do_deliver(nodeid, data, data_len);
}
void confchg_cb(cpg_handle_t handle, struct cpg_name *group_name,
@@ -143,11 +136,14 @@
}
if (flow_control_state == CPG_FLOW_CONTROL_ENABLED) {
+ if (message_flow_control_on == 0) {
+ log_debug("flow control on");
+ }
message_flow_control_on = 1;
- log_debug("flow control on");
} else {
- if (message_flow_control_on)
+ if (message_flow_control_on) {
log_debug("flow control off");
+ }
message_flow_control_on = 0;
}
}
@@ -156,20 +152,12 @@
{
cpg_error_t error;
- got_msg = 0;
- saved_len = 0;
- saved_nodeid = 0;
- memset(saved_data, 0, sizeof(saved_data));
-
- error = cpg_dispatch(daemon_handle, CPG_DISPATCH_ONE);
+ error = cpg_dispatch(daemon_handle, CPG_DISPATCH_ALL);
if (error != CPG_OK) {
log_error("cpg_dispatch error %d", error);
return -1;
}
- if (got_msg)
- do_deliver(saved_nodeid, saved_data, saved_len);
-
update_flow_control_status();
return 0;
next reply other threads:[~2006-11-30 19:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-30 19:50 teigland [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-11-30 19:49 [Cluster-devel] cluster/group/gfs_controld cpg.c teigland
2006-11-30 19:48 teigland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061130195020.30764.qmail@sourceware.org \
--to=teigland@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.