Cluster-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: lhh@sourceware.org <lhh@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/magma-plugins Makefile sm/sm.c
Date: 9 Jan 2008 18:54:47 -0000	[thread overview]
Message-ID: <20080109185447.7242.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2008-01-09 18:54:46

Modified files:
	magma-plugins  : Makefile 
	magma-plugins/sm: sm.c 

Log message:
	Fix #294491 - make magma_sm.so retry in dlm EINPROG condition

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/Makefile.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/sm/sm.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.9.2.12&r2=1.9.2.13

--- cluster/magma-plugins/Attic/Makefile	2004/08/03 16:39:14	1.2
+++ cluster/magma-plugins/Attic/Makefile	2008/01/09 18:54:46	1.2.2.1
@@ -10,25 +10,25 @@
 ###############################################################################
 ###############################################################################
 all:
-	cd cman && ${MAKE} all
+	#cd cman && ${MAKE} all
 	cd dumb && ${MAKE} all
 	cd gulm && ${MAKE} all
 	cd sm && ${MAKE} all
 
 clean:
-	cd cman && ${MAKE} clean
+	#cd cman && ${MAKE} clean
 	cd dumb && ${MAKE} clean
 	cd gulm && ${MAKE} clean
 	cd sm && ${MAKE} clean
 
 install:
-	cd cman && ${MAKE} install
+	#cd cman && ${MAKE} install
 	cd dumb && ${MAKE} install
 	cd gulm && ${MAKE} install
 	cd sm && ${MAKE} install
 
 uninstall:
-	cd cman && ${MAKE} uninstall
+	#cd cman && ${MAKE} uninstall
 	cd dumb && ${MAKE} uninstall
 	cd gulm && ${MAKE} uninstall
 	cd sm && ${MAKE} uninstall
--- cluster/magma-plugins/sm/Attic/sm.c	2007/04/23 18:24:58	1.9.2.12
+++ cluster/magma-plugins/sm/Attic/sm.c	2008/01/09 18:54:46	1.9.2.13
@@ -36,7 +36,7 @@
 #include <sys/select.h>
 #include <sys/stat.h>
 
-#define MODULE_DESCRIPTION "CMAN/SM Plugin v1.1.7.4"
+#define MODULE_DESCRIPTION "CMAN/SM Plugin v1.1.7.5"
 #define MODULE_AUTHOR      "Lon Hohberger"
 
 #define DLM_LS_NAME	   "Magma"
@@ -556,8 +556,9 @@
 	FD_ZERO(&rfds);
 	FD_SET(fd, &rfds);
 
-	if (select(fd + 1, &rfds, NULL, NULL, NULL) == 1)
+	if (select(fd + 1, &rfds, NULL, NULL, NULL) == 1) {
 		return dlm_dispatch(fd);
+	}
 
 	return -1;
 }
@@ -577,9 +578,12 @@
         if (ret < 0)
                 return -1;
 
-        if ((ret = (wait_for_dlm_event(p->ls) < 0))) {
-                fprintf(stderr, "wait_for_dlm_event: %d / %d\n",
-                        ret, errno);
+        while ((ret = (wait_for_dlm_event(p->ls) < 0))) {
+		/* If nothing much has happened, just
+		   wait a bit longer */
+		if (lksb->sb_status == EINPROG)
+			continue;
+                errno = lksb->sb_status;
                 return -1;
         }
 
@@ -648,7 +652,11 @@
 
         /* lksb->sb_status should be EINPROG at this point */
 
-        if (wait_for_dlm_event(p->ls) < 0) {
+        while (wait_for_dlm_event(p->ls) < 0) {
+		/* If nothing much has happened, just
+		   wait a bit longer */
+		if (lksb->sb_status == EINPROG)
+			continue;
                 errno = lksb->sb_status;
                 return -1;
         }
@@ -705,8 +713,11 @@
 		return ret;
 
 	while (lksb.sb_status == EINPROG) {
-		if (wait_for_dlm_event(p->ls) < 0)
+		if (wait_for_dlm_event(p->ls) < 0) {
+			if (lksb.sb_status == EINPROG)
+				continue;
 			return -1;
+		}
 	}
 
 	ret = -1;



                 reply	other threads:[~2008-01-09 18:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080109185447.7242.qmail@sourceware.org \
    --to=lhh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox