From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/ccs/daemon cluster_mgr.c
Date: 14 Dec 2006 21:01:03 -0000 [thread overview]
Message-ID: <20061214210103.31368.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2006-12-14 21:01:03
Modified files:
ccs/daemon : cluster_mgr.c
Log message:
Switch from CMAN_DISPATCH_ONE loop to CMAN_DISPATCH_ALL to resolve
delayed cman shutdown callbacks.
bz 219385
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/daemon/cluster_mgr.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.23&r2=1.23.2.1
--- cluster/ccs/daemon/cluster_mgr.c 2006/10/20 14:18:00 1.23
+++ cluster/ccs/daemon/cluster_mgr.c 2006/12/14 21:01:03 1.23.2.1
@@ -30,9 +30,6 @@
#include "globals.h"
#include "libcman.h"
-static int cman_flag;
-static int cman_reason;
-
typedef struct member_list {
int count;
int pad;
@@ -331,11 +328,19 @@
static void cman_callback(cman_handle_t handle, void *private, int reason, int arg)
{
- cman_flag = 1;
- cman_reason = reason;
+ switch (reason) {
+ case CMAN_REASON_TRY_SHUTDOWN:
+ cman_replyto_shutdown(handle, 1);
+ break;
+
+ case CMAN_REASON_STATECHANGE:
+ quorate = cman_is_quorate(handle);
+ free_member_list(members);
+ members = get_member_list(handle);
+ break;
- if (reason == CMAN_REASON_TRY_SHUTDOWN) {
- cman_replyto_shutdown(handle, 1);
+ default:
+ break;
}
}
@@ -344,17 +349,12 @@
{
ENTER("handle_cluster_event");
- if (cman_dispatch(handle, CMAN_DISPATCH_ONE) < 0) {
- return -1;
+ int rv = 1;
+ while (rv > 0) {
+ rv = cman_dispatch(handle, CMAN_DISPATCH_ALL);
}
-
- if (cman_flag) {
- cman_flag = 0;
- if (cman_reason == CMAN_REASON_STATECHANGE) {
- quorate = cman_is_quorate(handle);
- free_member_list(members);
- members = get_member_list(handle);
- }
+ if (rv < 0) {
+ return -1;
}
EXIT("handle_cluster_event");
next reply other threads:[~2006-12-14 21:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-14 21:01 teigland [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-05-02 12:42 [Cluster-devel] cluster/ccs/daemon cluster_mgr.c fabbione
2007-05-02 12:42 fabbione
2006-12-14 21:01 teigland
2006-12-14 21:00 teigland
2006-10-17 16:46 pcaulfield
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=20061214210103.31368.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.