cluster cmirror/src/Makefile cmirror/src/clogd ...
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: jbrassow at sourceware.org 2007-11-03 18:37:49
Modified files:
cmirror/src : Makefile clogd.c cluster.c common.h functions.c
local.c
cmirror-kernel/src: dm-clog-tfr.h dm-clog.c
Log message:
- Addition of disk logging
- Add 'is_remote_recovering' function
- Checkpoint clean-ups
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/Makefile.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.2&r2=1.3.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/clogd.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.1&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/cluster.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.1&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/common.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.1&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/functions.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.1&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/local.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.1&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror-kernel/src/dm-clog-tfr.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.1&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror-kernel/src/dm-clog.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.3&r2=1.2.2.4
cmirror/src/Attic/Makefile +1 -1
@@ -30,7 +30,7 @@ endif ifeq ($(DEBUG),log) -CFLAGS += -DDEBUG_LOG +CFLAGS += -DDEBUG endif CFLAGS += -g
cmirror/src/Attic/clogd.c +1 -0
@@ -42,6 +42,7 @@LOG_PRINT ("Starting clogd:" );LOG_PRINT (" Built: " __DATE__" " __TIME__"\n" ); +LOG_DBG (" Compiled with debugging." );while (!exit_now) {links_monitor ();
cmirror/src/Attic/cluster.c +176 -44
321 lines not on this page · raw message
cmirror/src/Attic/common.h +2 -0
@@ -16,6 +16,7 @@#define EXIT_QUEUE_NOMEM 7 +/* Located in dm-clog-tfr.h #define RQ_TYPE(x) \ ((x) == DM_CLOG_CTR) ? "DM_CLOG_CTR" : \ ((x) == DM_CLOG_DTR) ? "DM_CLOG_DTR" : \
@@ -34,5 +35,6 @@((x) == DM_CLOG_STATUS_INFO) ? "DM_CLOG_STATUS_INFO" : \ ((x) == DM_CLOG_STATUS_TABLE) ? "DM_CLOG_STATUS_TABLE" : \ NULL +*/ #endif /* __CLUSTER_LOG_COMMON_DOT_H__ */
cmirror/src/Attic/functions.c +496 -42
718 lines not on this page · raw message
cmirror/src/Attic/local.c +17 -0
@@ -164,6 +164,23 @@ RQ_TYPE(tfr->request_type));break ; +case DM_CLOG_RESUME : +/* +* Resume is a special case that requires a local +* component to join the CPG, and a cluster component +* to handle the request. +*/ + r =do_request (tfr); +if (r) { +LOG_DBG ("Returning failed request to kernel [%s]" , +RQ_TYPE (tfr->request_type)); + r =kernel_send (tfr); +if (r) +LOG_ERROR ("Failed to respond to kernel [%s]" , +RQ_TYPE (tfr->request_type)); +break ; + } +/* ELSE, fall through to default */ default :/* Add before send_to_cluster, so cluster code can find it */ queue_add_tail (tfr, cluster_queue);
cmirror-kernel/src/dm-clog-tfr.h +3 -1
@@ -27,6 +27,7 @@#define DM_CLOG_GET_SYNC_COUNT 14#define DM_CLOG_STATUS_INFO 15#define DM_CLOG_STATUS_TABLE 16 +#define DM_CLOG_IS_REMOTE_RECOVERING 17#define RQ_TYPE (x) \ ((x) == DM_CLOG_CTR) ? "DM_CLOG_CTR" : \
@@ -45,7 +46,8 @@ ((x) ==DM_CLOG_GET_SYNC_COUNT ) ?"DM_CLOG_GET_SYNC_COUNT" : \ ((x) ==DM_CLOG_STATUS_INFO ) ?"DM_CLOG_STATUS_INFO" : \ ((x) ==DM_CLOG_STATUS_TABLE ) ?"DM_CLOG_STATUS_TABLE" : \ -NULL + ((x) ==DM_CLOG_IS_REMOTE_RECOVERING ) ? \ +"DM_CLOG_IS_REMOTE_RECOVERING" :NULL struct clog_tfr { uint64_t private[2];
cmirror-kernel/src/dm-clog.c +18 -2
@@ -560,6 +560,20 @@return DMLOG_IOERR_BLOCK ; } +static int cluster_is_remote_recovering (struct dirty_log *log,region_t region) +{ +int r; +int is_recovering; +int rdata_size; +struct log_c *lc = (struct log_c *)log->context; + + rdata_size =sizeof (is_recovering); + r =dm_clog_consult_server (lc->uuid,DM_CLOG_IS_REMOTE_RECOVERING , + (char *)®ion,sizeof (region), + (char *)&is_recovering, &rdata_size); +return (r) ?1 : is_recovering; +} +static struct dirty_log_type _clustered_core_type = { .name ="clustered_core" , .module =THIS_MODULE ,
@@ -579,6 +593,7 @@ .get_sync_count = cluster_get_sync_count, .status = cluster_status, .get_failure_response = cluster_get_failure_response, + .is_remote_recovering = cluster_is_remote_recovering, };static struct dirty_log_type _clustered_disk_type = {
@@ -600,6 +615,7 @@ .get_sync_count = cluster_get_sync_count, .status = cluster_status, .get_failure_response = cluster_get_failure_response, + .is_remote_recovering = cluster_is_remote_recovering, };static int __init cluster_dirty_log_init (void )
@@ -638,7 +654,7 @@return r; } -DMINFO ("dm-clulog (built %s %s) installed" , __DATE__, __TIME__); +DMINFO ("dm-log-clustered (built %s %s) installed" , __DATE__, __TIME__);return 0 ; }
@@ -648,7 +664,7 @@dm_unregister_dirty_log_type (&_clustered_core_type);dm_clog_tfr_exit ();mempool_destroy (flush_entry_pool); -DMINFO ("dm-clulog (built %s %s) removed" , __DATE__, __TIME__); +DMINFO ("dm-log-clustered (built %s %s) removed" , __DATE__, __TIME__);return ; }