Not sure why this function was added, what it does, or if it is
necessary, but this patch removes it since it doesn't really seem
helpful.

I can't tell who added it but if you added it and do think it is useful,
let us know what it does and why we should keep it.  btw its not in
whitetank.

I'll sit on this patch for 3-4 days to give plenty of time to respond.

Thanks!
-steve

Index: services/cpg.c
===================================================================
--- services/cpg.c	(revision 1781)
+++ services/cpg.c	(working copy)
@@ -169,8 +169,6 @@
 
 static void message_handler_req_lib_cpg_local_get (void *conn, void *message);
 
-static void message_handler_req_lib_cpg_groups_get (void *conn, void *message);
-
 static int cpg_node_joinleave_send (struct group_info *gi, struct process_info *pi, int fn, int reason);
 
 static int cpg_exec_send_joinlist(void);
@@ -225,12 +223,6 @@
 		.response_size				= sizeof (struct res_lib_cpg_local_get),
 		.response_id				= MESSAGE_RES_CPG_LOCAL_GET,
 		.flow_control				= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
-	},
-	{ /* 7 */
-		.lib_handler_fn				= message_handler_req_lib_cpg_groups_get,
-		.response_size				= sizeof (struct res_lib_cpg_groups_get),
-		.response_id				= MESSAGE_RES_CPG_GROUPS_GET,
-		.flow_control				= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
 	}
 };
 
@@ -494,20 +486,6 @@
 	return (0);
 }
 
-static int count_groups(void)
-{
-	struct list_head *iter;
-	int num_groups = 0;
-	uint32_t hash;
-
-	for (hash=0 ; hash < GROUP_HASH_SIZE; hash++) {
-		for (iter = group_lists[hash].next; iter != &group_lists[hash]; iter = iter->next) {
-			num_groups++;
-		}
-	}
-	return num_groups;
-}
-
 static struct group_info *get_group(mar_cpg_name_t *name)
 {
 	struct list_head *iter;
@@ -1206,17 +1184,3 @@
 	api->ipc_response_send(conn, &res_lib_cpg_local_get,
 		sizeof(res_lib_cpg_local_get));
 }
-
-static void message_handler_req_lib_cpg_groups_get (void *conn, void *message)
-{
-	struct res_lib_cpg_groups_get res_lib_cpg_groups_get;
-
-	res_lib_cpg_groups_get.header.size = sizeof(res_lib_cpg_groups_get);
-	res_lib_cpg_groups_get.header.id = MESSAGE_RES_CPG_GROUPS_GET;
-	res_lib_cpg_groups_get.header.error = CS_OK;
-	res_lib_cpg_groups_get.num_groups = count_groups();
-
-	api->ipc_response_send(conn, &res_lib_cpg_groups_get,
-		sizeof(res_lib_cpg_groups_get));
-}
-
Index: include/corosync/ipc_cpg.h
===================================================================
--- include/corosync/ipc_cpg.h	(revision 1777)
+++ include/corosync/ipc_cpg.h	(working copy)
@@ -165,22 +165,4 @@
 	mar_res_header_t header __attribute__((aligned(8)));
 };
 
-struct req_lib_cpg_groups_get {
-	mar_req_header_t header __attribute__((aligned(8)));
-};
-
-struct res_lib_cpg_groups_get {
-	mar_res_header_t header __attribute__((aligned(8)));
-	mar_uint32_t num_groups __attribute__((aligned(8)));
-};
-
-struct res_lib_cpg_groups_get_callback {
-	mar_res_header_t header __attribute__((aligned(8)));
-	mar_uint32_t group_num  __attribute__((aligned(8)));
-	mar_uint32_t total_groups  __attribute__((aligned(8)));
-	mar_cpg_name_t group_name __attribute__((aligned(8)));
-	mar_uint32_t num_members __attribute__((aligned(8)));
-	mar_cpg_address_t member_list[];
-};
-
 #endif /* IPC_CPG_H_DEFINED */
Index: include/corosync/cpg.h
===================================================================
--- include/corosync/cpg.h	(revision 1777)
+++ include/corosync/cpg.h	(working copy)
@@ -94,17 +94,9 @@
 	struct cpg_address *left_list, int left_list_entries,
 	struct cpg_address *joined_list, int joined_list_entries);
 
-typedef void (*cpg_groups_get_fn_t) (
-	cpg_handle_t handle,
-	uint32_t group_num,
-	uint32_t group_total,
-	struct cpg_name *group_name,
-	struct cpg_address *member_list, int member_list_entries);
-
 typedef struct {
 	cpg_deliver_fn_t cpg_deliver_fn;
 	cpg_confchg_fn_t cpg_confchg_fn;
-	cpg_groups_get_fn_t cpg_groups_get_fn;
 } cpg_callbacks_t;
 
 /** @} */
@@ -190,10 +182,6 @@
 	cpg_handle_t handle,
 	unsigned int *local_nodeid);
 
-cs_error_t cpg_groups_get (
-	cpg_handle_t handle,
-	unsigned int *num_groups);
-
 cs_error_t cpg_flow_control_state_get (
 	cpg_handle_t handle,
 	cpg_flow_control_state_t *flow_control_enabled);
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to