public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* master - gfs_controld: ignore second leave
@ 2008-09-09 15:58 David Teigland
0 siblings, 0 replies; only message in thread
From: David Teigland @ 2008-09-09 15:58 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=7e1804f040eedb0899245fb71bb79395f5be86d3
Commit: 7e1804f040eedb0899245fb71bb79395f5be86d3
Parent: f9111c411ad562d02df688cc64689462f43c8e0b
Author: David Teigland <teigland@redhat.com>
AuthorDate: Mon Sep 8 16:26:12 2008 -0500
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Mon Sep 8 16:26:12 2008 -0500
gfs_controld: ignore second leave
When mount(2) fails we often get two leave requests. The second
can be ignored, don't log an error message.
Signed-off-by: David Teigland <teigland@redhat.com>
---
fence/fenced/cpg.c | 4 ++--
group/dlm_controld/cpg.c | 4 ++--
group/gfs_controld/cpg-new.c | 16 +++++++++++++---
3 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/fence/fenced/cpg.c b/fence/fenced/cpg.c
index af0cb5a..b8bf79a 100644
--- a/fence/fenced/cpg.c
+++ b/fence/fenced/cpg.c
@@ -548,11 +548,11 @@ static int wait_messages_done(struct fd *fd)
}
if (need) {
- log_debug("wait_messages_done need %d of %d", need, total);
+ log_debug("wait_messages need %d of %d", need, total);
return 0;
}
- log_debug("wait_messages_done got all %d", total);
+ log_debug("wait_messages got all %d", total);
return 1;
}
diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c
index 8e5b0b0..37c302a 100644
--- a/group/dlm_controld/cpg.c
+++ b/group/dlm_controld/cpg.c
@@ -630,11 +630,11 @@ static int wait_messages_done(struct lockspace *ls)
}
if (need) {
- log_group(ls, "wait_messages_done need %d of %d", need, total);
+ log_group(ls, "wait_messages need %d of %d", need, total);
return 0;
}
- log_group(ls, "wait_messages_done got all %d", total);
+ log_group(ls, "wait_messages got all %d", total);
return 1;
}
diff --git a/group/gfs_controld/cpg-new.c b/group/gfs_controld/cpg-new.c
index fc9a6c2..cfe0cf6 100644
--- a/group/gfs_controld/cpg-new.c
+++ b/group/gfs_controld/cpg-new.c
@@ -738,11 +738,11 @@ static int wait_messages_done(struct mountgroup *mg)
}
if (need) {
- log_group(mg, "wait_messages_done need %d of %d", need, total);
+ log_group(mg, "wait_messages need %d of %d", need, total);
return 0;
}
- log_group(mg, "wait_messages_done got all %d", total);
+ log_group(mg, "wait_messages got all %d", total);
return 1;
}
@@ -2376,6 +2376,11 @@ int gfs_join_mountgroup(struct mountgroup *mg)
return -ENOTCONN;
}
+/* If mount(2) fails, we'll often get two leaves, one from seeing the remove
+ uevent, and the other from mount.gfs. I suspect they could arrive in either
+ order. We can just ignore the second. The second would either not find
+ the mg here, or would see mg->leaving of 1 from the first. */
+
void gfs_leave_mountgroup(char *mgname, int mnterr)
{
struct mountgroup *mg;
@@ -2385,7 +2390,12 @@ void gfs_leave_mountgroup(char *mgname, int mnterr)
mg = find_mg(mgname);
if (!mg) {
- log_error("leave: %s not found", mgname);
+ log_debug("leave: %s not found", mgname);
+ return;
+ }
+
+ if (mg->leaving) {
+ log_debug("leave: %s already leaving", mgname);
return;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-09-08 21:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-09 15:58 master - gfs_controld: ignore second leave David Teigland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).