From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/group/gfs_controld lock_dlm.h recover.c
Date: 23 Oct 2006 15:44:34 -0000 [thread overview]
Message-ID: <20061023154434.14039.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-10-23 15:44:34
Modified files:
group/gfs_controld: lock_dlm.h recover.c
Log message:
Patch from Abhi to fix case where a node's mount is rejected by other
group members causing gfs_controld on the mounter to leave the group
immediately. It was sometimes leaving before its join was even
finished which caused groupd to reject the leave, so we need to wait
for the join to complete before doing the leave.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/lock_dlm.h.diff?cvsroot=cluster&r1=1.20&r2=1.21
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/recover.c.diff?cvsroot=cluster&r1=1.22&r2=1.23
--- cluster/group/gfs_controld/lock_dlm.h 2006/10/16 14:44:02 1.20
+++ cluster/group/gfs_controld/lock_dlm.h 2006/10/23 15:44:33 1.21
@@ -138,6 +138,7 @@
int mount_client_fd;
int mount_client_notified;
int mount_client_delay;
+ int group_leave_on_finish;
int remount_client;
int init;
int got_our_options;
--- cluster/group/gfs_controld/recover.c 2006/10/16 17:12:10 1.22
+++ cluster/group/gfs_controld/recover.c 2006/10/23 15:44:33 1.23
@@ -1933,6 +1933,9 @@
{
char buf[MAXLINE];
int rv, error = 0;
+ struct mg_member *memb;
+
+ memb = find_memb_nodeid(mg, our_nodeid);
memset(buf, 0, MAXLINE);
@@ -1963,9 +1966,15 @@
if (error) {
log_group(mg, "leaving due to mount error: %s", mg->error_msg);
- group_leave(gh, mg->name);
- } else
+ if (memb->finished)
+ group_leave(gh, mg->name);
+ else {
+ log_group(mg, "delay leave until after join");
+ mg->group_leave_on_finish = 1;
+ }
+ } else {
mg->mount_client_notified = 1;
+ }
}
void ping_kernel_mount(char *table)
@@ -2192,6 +2201,13 @@
list_for_each_entry(memb, &mg->members, list)
memb->finished = 1;
+ if (mg->group_leave_on_finish) {
+ log_group(mg, "leaving group after delay for join to finish");
+ group_leave(gh, mg->name);
+ mg->group_leave_on_finish = 0;
+ return 0;
+ }
+
if (mg->needs_recovery) {
log_group(mg, "finish: leave locks blocked for needs_recovery");
leave_blocked = 1;
next reply other threads:[~2006-10-23 15:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-23 15:44 teigland [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-09-04 19:27 [Cluster-devel] cluster/group/gfs_controld lock_dlm.h recover.c teigland
2007-09-04 19:22 teigland
2006-12-19 17:07 teigland
2006-12-19 17:07 teigland
2006-12-19 17:06 teigland
2006-12-19 1:48 rpeterso
2006-12-19 1:46 rpeterso
2006-12-19 1:42 rpeterso
2006-10-16 14:44 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=20061023154434.14039.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 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 NNTP newsgroup(s).