cluster/group/gfs_controld cpg.c plock.c recover.c
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-10-06 15:34:52
Modified files:
group/gfs_controld: cpg.c plock.c recover.c
Log message:
- check cpg flow control status from openais when processing plocks
- handle case where we're mounting and the only other mounted node fails -- we need to become the first mounter if we've not begun mount(2) yet
- journal recovery requests need to be fed serially to gfs, we weren't doing that in the case where a gfs journal recovery was in progress when another node failed
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/cpg.c.diff?cvsroot=cluster&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/plock.c.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.17&r2=1.18
group/gfs_controld/cpg.c +18 -0
@@ -19,6 +19,7 @@static int saved_nodeid;static int saved_len;static char saved_data[MAX_MSGLEN ]; +int message_flow_control_on;void receive_journals (struct mountgroup *mg,char *buf,int len,int from);void receive_options (struct mountgroup *mg,char *buf,int len,int from);
@@ -127,6 +128,7 @@int process_cpg (void ) { +cpg_flow_control_state_t flow_control_state;cpg_error_t error; got_msg =0 ;
@@ -142,6 +144,22 @@if (got_msg)do_deliver (saved_nodeid, saved_data, saved_len); + + error =cpg_flow_control_state_get (daemon_handle, &flow_control_state); +if (error !=CPG_OK ) { +log_error ("cpg_flow_control_state_get %d" , error); +return -1 ; + } + +if (flow_control_state ==CPG_FLOW_CONTROL_ENABLED ) { + message_flow_control_on =1 ; +log_debug ("flow control on" ); + }else { +if (message_flow_control_on) +log_debug ("flow control off" ); + message_flow_control_on =0 ; + } +return 0 ; }
group/gfs_controld/plock.c +5 -0
@@ -46,6 +46,7 @@static int control_fd =-1 ;extern int our_nodeid;static int plocks_online =0 ; +extern int message_flow_control_on;static SaCkptHandleT ckpt_handle;static SaCkptCallbacksT callbacks = {0 ,0 };
@@ -297,6 +298,10 @@char *buf;int len, rv; +/* Don't send more messages while the cpg message queue is backed up */ +if (message_flow_control_on) +return 0 ; +memset (&info,0 ,sizeof (info)); rv =read (control_fd, &info,sizeof (info));
group/gfs_controld/recover.c +90 -34
183 lines not on this page · raw message