[Sheepdog] [PATCH 1/3] cluster, corosync: add two dprintf

Liu Yuan namei.unix at gmail.com
Wed Nov 30 12:59:58 CET 2011


From: Liu Yuan <tailai.ly at taobao.com>

It is helpful, really.

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 sheep/cluster/corosync.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/sheep/cluster/corosync.c b/sheep/cluster/corosync.c
index cfb7aa4..971a796 100644
--- a/sheep/cluster/corosync.c
+++ b/sheep/cluster/corosync.c
@@ -432,6 +432,8 @@ static void cdrv_cpg_deliver(cpg_handle_t handle,
 	struct corosync_event *cevent;
 	struct corosync_message *cmsg = msg;
 
+	dprintf("%d\n", cmsg->type);
+
 	cevent = zalloc(sizeof(*cevent));
 	if (!cevent)
 		panic("failed to allocate memory\n");
@@ -511,6 +513,10 @@ static void cdrv_cpg_confchg(cpg_handle_t handle,
 	struct cpg_node joined_sheep[SD_MAX_NODES];
 	struct cpg_node left_sheep[SD_MAX_NODES];
 
+	dprintf("mem:%zu, joined:%zu, left:%zu\n",
+		member_list_entries, joined_list_entries,
+		left_list_entries);
+
 	/* convert cpg_address to cpg_node */
 	for (i = 0; i < left_list_entries; i++) {
 		left_sheep[i].nodeid = left_list[i].nodeid;
-- 
1.7.8.rc3




More information about the sheepdog mailing list