cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] cluster/group/gfs_controld plock.c recover.c
@ 2006-08-02 20:50 teigland
  0 siblings, 0 replies; 2+ messages in thread
From: teigland @ 2006-08-02 20:50 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland at sourceware.org	2006-08-02 20:50:40

Modified files:
	group/gfs_controld: plock.c recover.c 

Log message:
	- complain and ignore checkpoint sections with a bad size
	- do checkpoint for new nodes if low node in charge of that failed

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/plock.c.diff?cvsroot=cluster&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/recover.c.diff?cvsroot=cluster&r1=1.6&r2=1.7

--- cluster/group/gfs_controld/plock.c	2006/08/02 19:23:41	1.5
+++ cluster/group/gfs_controld/plock.c	2006/08/02 20:50:40	1.6
@@ -1235,6 +1235,12 @@
 			  iov.readSize);
 		section_len = iov.readSize;
 
+		if (!section_len || section_len % sizeof(struct pack_plock)) {
+			log_error("retrieve_plocks: bad section len %d %s",
+				  section_len, mg->name);
+			continue;
+		}
+
 		unpack_section_buf(mg, desc.sectionId.id, desc.sectionId.idLen);
 	}
 
--- cluster/group/gfs_controld/recover.c	2006/08/02 18:27:57	1.6
+++ cluster/group/gfs_controld/recover.c	2006/08/02 20:50:40	1.7
@@ -1887,15 +1887,23 @@
 /* New mounters may be waiting for a journals message that a failed node (as
    low nodeid) would have sent.  If the low nodeid failed and we're the new low
    nodeid, then send a journals message to any nodes for whom we've not seen a
-   journals message. */
+   journals message.  We also need to checkpoint the plock state for the new
+   nodes to read after they get their journals message. */
 
 void resend_journals(struct mountgroup *mg)
 {
 	struct mg_member *memb;
+	int stored_plocks = 0;
 
 	list_for_each_entry(memb, &mg->members, list) {
 		if (!memb->needs_journals)
 			continue;
+
+		if (!stored_plocks) {
+			store_plocks(mg);
+			stored_plocks = 1;
+		}
+
 		log_group(mg, "resend_journals to %d", memb->nodeid);
 		send_journals(mg, memb->nodeid);
 	}



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Cluster-devel] cluster/group/gfs_controld plock.c recover.c
@ 2006-10-16 17:12 teigland
  0 siblings, 0 replies; 2+ messages in thread
From: teigland @ 2006-10-16 17:12 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland at sourceware.org	2006-10-16 17:12:10

Modified files:
	group/gfs_controld: plock.c recover.c 

Log message:
	Recent changes to mount scenarios (mounts while another node is doing
	first mount recovery) added a couple places where we need to clear
	the "save_plocks" flag to allow a new mount to begin processing plock
	requests.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/plock.c.diff?cvsroot=cluster&r1=1.23&r2=1.24
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/recover.c.diff?cvsroot=cluster&r1=1.21&r2=1.22

--- cluster/group/gfs_controld/plock.c	2006/10/09 21:51:49	1.23
+++ cluster/group/gfs_controld/plock.c	2006/10/16 17:12:10	1.24
@@ -865,7 +865,7 @@
 }
 
 /* When mg members receive our options message (for our mount), one of them
-   saves all plock state received to that point in a checkpoint and then sounds
+   saves all plock state received to that point in a checkpoint and then sends
    us our journals message.  We know to retrieve the plock state from the
    checkpoint when we receive our journals message.  Any plocks messages that
    arrive between seeing our options message and our journals message needs to
@@ -943,8 +943,6 @@
 {
 	struct save_msg *sm, *sm2;
 
-	mg->save_plocks = 0;
-
 	if (list_empty(&mg->saved_messages))
 		return;
 
--- cluster/group/gfs_controld/recover.c	2006/10/16 15:09:25	1.21
+++ cluster/group/gfs_controld/recover.c	2006/10/16 17:12:10	1.22
@@ -999,6 +999,7 @@
 		mg->first_mounter = 1;
 		mg->first_mounter_done = 0;
 		mg->mount_client_delay = 0;
+		mg->save_plocks = 0;
 		goto out;
 	} else if (remote_first_mounter_recovery(mg)) {
 		/* delay notifying mount client until we get a successful
@@ -1006,10 +1007,12 @@
 		log_group(mg, "other node doing first mounter recovery, "
 			  "delay notify_mount_client");
 		mg->mount_client_delay = 1;
+		mg->save_plocks = 0;
 		return;
 	}
 
 	retrieve_plocks(mg);
+	mg->save_plocks = 0;
 	process_saved_plocks(mg);
  out:
 	notify_mount_client(mg);



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-16 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-16 17:12 [Cluster-devel] cluster/group/gfs_controld plock.c recover.c teigland
  -- strict thread matches above, loose matches on Subject: below --
2006-08-02 20:50 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 NNTP newsgroup(s).