[Cluster-devel] cluster/magma-plugins Makefile sm/sm.c
lhh at sourceware.org
lhh at sourceware.org
Wed Jan 9 18:54:47 UTC 2008
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;
More information about the Cluster-devel
mailing list