cluster/group/gfs_controld cpg.c group.c lock_ ...
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-10-13 20:00:02
Modified files:
group/gfs_controld: cpg.c group.c lock_dlm.h main.c recover.c
Log message:
Handling a lot of hard situations in the areas of:
- recoveries mixed with mounts in lots of different ways
- mount failures while lots of nodes are mounting in parallel
(Part of this is also an update to mount.gfs, both gfs_controld and mount.gfs need to be updated together.)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/cpg.c.diff?cvsroot=cluster&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/group.c.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/lock_dlm.h.diff?cvsroot=cluster&r1=1.18&r2=1.19
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.16&r2=1.17
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/recover.c.diff?cvsroot=cluster&r1=1.18&r2=1.19
group/gfs_controld/cpg.c +5 -0
@@ -26,6 +26,7 @@void receive_remount (struct mountgroup *mg,char *buf,int len,int from);void receive_plock (struct mountgroup *mg,char *buf,int len,int from);void receive_withdraw (struct mountgroup *mg,char *buf,int len,int from); +void receive_mount_status (struct mountgroup *mg,char *buf,int len,int from);void receive_recovery_status (struct mountgroup *mg,char *buf,int len,int from);void receive_recovery_done (struct mountgroup *mg,char *buf,int len,int from);
@@ -87,6 +88,10 @@receive_plock (mg, data, len, nodeid);break ; +case MSG_MOUNT_STATUS : +receive_mount_status (mg, data, len, nodeid); +break ; +case MSG_RECOVERY_STATUS :receive_recovery_status (mg, data, len, nodeid);break ;
group/gfs_controld/group.c +6 -8
@@ -15,8 +15,6 @@/* save all the params from callback functions here because we can't do the processing within the callback function itself */ -#define GROUPD_TIMEOUT 10/* seconds */ -group_handle_t gh;static int cb_action;static char cb_name[MAX_GROUP_NAME_LEN +1 ];
@@ -124,14 +122,14 @@switch (cb_action) {case DO_STOP : -log_debug ("groupd callback: stop %s" , cb_name); +log_debug ("groupd cb: stop %s" , cb_name); mg->last_callback =DO_STOP ; mg->last_stop = mg->last_start;do_stop (mg);break ;case DO_START : -log_debug ("groupd callback: start %s type %d count %d members %s" , +log_debug ("groupd cb: start %s type %d count %d members %s" , cb_name, cb_type, cb_member_count,str_members ()); mg->last_callback =DO_START ; mg->last_start = cb_event_nr;
@@ -139,20 +137,20 @@break ;case DO_FINISH : -log_debug ("groupd callback: finish %s" , cb_name); +log_debug ("groupd cb: finish %s" , cb_name); mg->last_callback =DO_FINISH ; mg->last_finish = cb_event_nr;do_finish (mg);break ;case DO_TERMINATE : -log_debug ("groupd callback: terminate %s" , cb_name); +log_debug ("groupd cb: terminate %s" , cb_name); mg->last_callback =DO_TERMINATE ;do_terminate (mg);break ;case DO_SETID : -log_debug ("groupd callback: set_id %s %x" , cb_name, cb_id); +log_debug ("groupd cb: set_id %s %x" , cb_name, cb_id); mg->id = cb_id;break ;
@@ -170,7 +168,7 @@int rv; gh =group_init (NULL ,LOCK_DLM_GROUP_NAME ,LOCK_DLM_GROUP_LEVEL , - &callbacks,GROUPD_TIMEOUT ); + &callbacks,10 );if (!gh) {log_error ("group_init error %d %d" , (int ) gh, errno);return -ENOTCONN ;
group/gfs_controld/lock_dlm.h +12 -6
@@ -135,16 +135,18 @@char error_msg[128 ];int mount_client; +int mount_client_fd; +int mount_client_notified; +int mount_client_delay;int remount_client;int init;int got_our_options;int got_our_journals; -int mount_client_notified; -int mount_client_delay;int delay_send_journals;int kernel_mount_error; -int mount_error_fd; +int kernel_mount_done;int got_kernel_mount; +int first_mount_pending_stop;int first_mounter;int first_mounter_done;int emulate_first_mounter;
@@ -212,6 +214,10 @@int recovery_status;int withdrawing;int needs_journals; + +int ms_kernel_mount_done; +int ms_first_mounter; +int ms_kernel_mount_error; };enum {
@@ -220,6 +226,7 @@MSG_REMOUNT ,MSG_PLOCK ,MSG_WITHDRAW , +MSG_MOUNT_STATUS ,MSG_RECOVERY_STATUS , MSG_RECOVERY_DONE, };
@@ -258,16 +265,15 @@int process_plocks (void );void exit_cman (void ); -void setup_mount_error_fd (struct mountgroup *mg); -int do_mount (int ci,char *dir,char *type,char *proto,char *table, -char *options); +char *options,struct mountgroup **mg_ret);int do_unmount (int ci,char *dir,int mnterr);int do_remount (int ci,char *dir,char *mode);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); +void got_mount_result (struct mountgroup *mg,int result);int client_send (int ci,char *buf,int len);
group/gfs_controld/main.c +41 -22
108 lines not on this page · raw message
group/gfs_controld/recover.c +485 -215
958 lines not on this page · raw message