cluster/group/gfs_controld lock_dlm.h plock.c ...
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-08-02 18:27:58
Modified files:
group/gfs_controld: lock_dlm.h plock.c recover.c
Log message:
- checkpoint usage for plocks is getting closer, basic writing/reading of plock state to/from ckpt's works, but unlinking ckpt's and clearing open ckpt's from processes that exit don't appear to be working right in openais
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/lock_dlm.h.diff?cvsroot=cluster&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/plock.c.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/recover.c.diff?cvsroot=cluster&r1=1.5&r2=1.6
group/gfs_controld/lock_dlm.h +10 -0
@@ -140,6 +140,7 @@int emulate_first_mounter;int wait_first_done;int low_finished_nodeid; +int save_plocks;uint64_t cp_handle;time_t last_checkpoint_time;
@@ -224,6 +225,13 @@char name[MAXNAME ]; }; +struct save_msg { +struct list_head list; +int nodeid; +int len; +int type; +char buf[0 ]; +};struct mountgroup *find_mg (char *name);struct mountgroup *find_mg_id (uint32_t id);
@@ -245,6 +253,7 @@int do_withdraw (char *name);int kernel_recovery_done (char *name);void ping_kernel_mount (char *table); +void save_message (struct mountgroup *mg,char *buf,int len,int from,int type);int client_send (int ci,char *buf,int len);
@@ -253,5 +262,6 @@void store_plocks (struct mountgroup *mg);void retrieve_plocks (struct mountgroup *mg);int dump_plocks (char *name,int fd); +void process_saved_plocks (struct mountgroup *mg);#endif
group/gfs_controld/plock.c +174 -37
387 lines not on this page · raw message
group/gfs_controld/recover.c +5 -10
@@ -12,14 +12,6 @@#include "lock_dlm.h" -struct save_msg { -struct list_head list; -int nodeid; -int len; -int type; -char buf[0 ]; -}; -#define SYSFS_DIR "/sys/fs"#define JID_INIT -9
@@ -597,12 +589,14 @@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 we're the first mounter and haven't gotten others_may_mount yet, then don't send journals until kernel_recovery_done_first so the second node won't mount the fs until omm. */ if (mg->low_finished_nodeid == our_nodeid) { -store_plocks (mg);if (mg->first_mounter && !mg->first_mounter_done) {log_group (mg,"delay sending journals to %d" , new->nodeid);
@@ -655,6 +649,7 @@if (hd->nodeid == our_nodeid) { mg->got_our_options =1 ; + mg->save_plocks =1 ;return ; }
@@ -1784,7 +1779,7 @@ }retrieve_plocks (mg); -/* process_saved_plocks(mg); */ +process_saved_plocks (mg); out:notify_mount_client (mg); }