cluster/group/gfs_controld lock_dlm.h plock.c ...
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-08-08 21:19:18
Modified files:
group/gfs_controld: lock_dlm.h plock.c recover.c
Log message:
The idea to have the last node that did the checkpoint try to reuse it even if it wasn't the low nodeid any more doesn't work because the new mounter tries to read the ckpt when it gets the journals message from the low nodeid before the ckpt is written from the other node. Now, the low nodeid is always the one to create a ckpt for a new mounter which means a node saving the last ckpt needs to unlink it when it sees a new low nodeid join the group.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/lock_dlm.h.diff?cvsroot=cluster&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/plock.c.diff?cvsroot=cluster&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/recover.c.diff?cvsroot=cluster&r1=1.9&r2=1.10
group/gfs_controld/lock_dlm.h +2 -1
@@ -140,6 +140,7 @@int emulate_first_mounter;int wait_first_done;int low_finished_nodeid; +int low_nodeid;int save_plocks;uint64_t cp_handle;
@@ -259,7 +260,7 @@int send_group_message (struct mountgroup *mg,int len,char *buf); -void store_plocks (struct mountgroup *mg); +void store_plocks (struct mountgroup *mg,int nodeid);void retrieve_plocks (struct mountgroup *mg);int dump_plocks (char *name,int fd);void process_saved_plocks (struct mountgroup *mg);
group/gfs_controld/plock.c +29 -16
70 lines not on this page · raw message
group/gfs_controld/recover.c +6 -3
@@ -589,8 +589,8 @@log_group (mg,"assign_journal: new member %d got jid %d" , new->nodeid, new->jid); -if (mg->low_finished_nodeid == our_nodeid || mg->cp_handle) -store_plocks (mg); +if (mg->low_finished_nodeid == our_nodeid) +store_plocks (mg, new->nodeid);/* if we're the first mounter and haven't gotten others_may_mount yet, then don't send journals until kernel_recovery_done_first
@@ -982,6 +982,8 @@ }list_for_each_entry (memb, &mg->members, list) { +if (mg->low_nodeid ==-1 || memb->nodeid < mg->low_nodeid) + mg->low_nodeid = memb->nodeid;if (!memb->finished)continue ;if (low ==-1 || memb->nodeid < low)
@@ -1008,6 +1010,7 @@INIT_LIST_HEAD (&mg->resources);INIT_LIST_HEAD (&mg->saved_messages); mg->init =1 ; + mg->low_nodeid =-1 ;strncpy (mg->name, name,MAXNAME );
@@ -1902,7 +1905,7 @@continue ;if (!stored_plocks) { -store_plocks (mg); +store_plocks (mg, memb->nodeid); stored_plocks =1 ; }