All of lore.kernel.org
 help / color / mirror / Atom feed
From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/group/daemon app.c
Date: 15 Sep 2006 20:07:15 -0000	[thread overview]
Message-ID: <20060915200715.17698.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland at sourceware.org	2006-09-15 20:07:15

Modified files:
	group/daemon   : app.c 

Log message:
	positive return code from recover_current_event() should just indicate
	that the event should be processed again, and not added to the return
	value of process_app() which causes the whole thing to be called in
	a loop

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/app.c.diff?cvsroot=cluster&r1=1.44&r2=1.45

--- cluster/group/daemon/app.c	2006/09/14 20:56:55	1.44
+++ cluster/group/daemon/app.c	2006/09/15 20:07:15	1.45
@@ -1323,7 +1323,8 @@
 		dump_group(g);
 }
 
-/* handle a node failure while processing an event */
+/* handle a node failure while processing an event. returning > 0 means
+   we want process_current_event() to be called for the group */
 
 int recover_current_event(group_t *g)
 {
@@ -1443,17 +1444,13 @@
 		rv += ret;
 
 		ret = recover_current_event(g);
-		if (ret > 0) {
-			rv += ret;
-
-			/* it's important that we call process_current_event()
-			   when recover_current_event() returns 1 */
+		if (ret <= 0)
+			goto out;
 
-			ret = process_current_event(g);
-			if (ret < 0)
-				goto out;
-			rv += ret;
-		}
+		ret = process_current_event(g);
+		if (ret < 0)
+			goto out;
+		rv += ret;
 	} else {
 		/* We only take on a new non-recovery event if there are
 		   no recovery sets outstanding.  The new event may be
@@ -1481,6 +1478,8 @@
 	return rv;
 }
 
+/* process_apps() will be called again immediately if it returns > 0 */
+
 int process_apps(void)
 {
 	group_t *g, *safe;



             reply	other threads:[~2006-09-15 20:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-15 20:07 teigland [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-10-16 15:52 [Cluster-devel] cluster/group/daemon app.c teigland
2006-10-12 14:25 teigland
2006-09-14 20:56 teigland
2006-08-31 18:20 teigland
2006-08-22 14:36 teigland
2006-08-14 21:01 teigland
2006-08-02 20:30 teigland
2006-07-19 19:45 teigland
2006-07-17 18:22 teigland
2006-07-17 17:06 rohara
2006-07-14 20:45 teigland
2006-07-16  7:51 ` Fabio Massimo Di Nitto
2006-07-17 17:08   ` Ryan O'Hara
2006-06-22 21:12 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=20060915200715.17698.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.