svn commit: samba r21256 - in branches/SAMBA_4_0/source: cluster
cluster/ctdb cluster/ctdb/common cluster/ctdb/include lib/messaging
tridge at samba.org
tridge at samba.org
Fri Feb 9 01:52:14 GMT 2007
Author: tridge
Date: 2007-02-09 01:52:13 +0000 (Fri, 09 Feb 2007)
New Revision: 21256
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21256
Log:
- msg_type is not needed in the cluster messaging API
- merge ctdb_get_num_nodes() from bzr tree
Modified:
branches/SAMBA_4_0/source/cluster/cluster.c
branches/SAMBA_4_0/source/cluster/cluster.h
branches/SAMBA_4_0/source/cluster/cluster_private.h
branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb.c
branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_message.c
branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c
branches/SAMBA_4_0/source/cluster/ctdb/include/ctdb.h
branches/SAMBA_4_0/source/cluster/local.c
branches/SAMBA_4_0/source/lib/messaging/messaging.c
Changeset:
Modified: branches/SAMBA_4_0/source/cluster/cluster.c
===================================================================
--- branches/SAMBA_4_0/source/cluster/cluster.c 2007-02-09 01:49:26 UTC (rev 21255)
+++ branches/SAMBA_4_0/source/cluster/cluster.c 2007-02-09 01:52:13 UTC (rev 21256)
@@ -89,8 +89,8 @@
/*
send a message to another node in the cluster
*/
-NTSTATUS cluster_message_send(struct server_id server, uint32_t msg_type, DATA_BLOB *data)
+NTSTATUS cluster_message_send(struct server_id server, DATA_BLOB *data)
{
cluster_init();
- return ops->message_send(ops, server, msg_type, data);
+ return ops->message_send(ops, server, data);
}
Modified: branches/SAMBA_4_0/source/cluster/cluster.h
===================================================================
--- branches/SAMBA_4_0/source/cluster/cluster.h 2007-02-09 01:49:26 UTC (rev 21255)
+++ branches/SAMBA_4_0/source/cluster/cluster.h 2007-02-09 01:52:13 UTC (rev 21256)
@@ -44,6 +44,6 @@
NTSTATUS cluster_message_init(struct messaging_context *msg, struct server_id server,
cluster_message_fn_t handler);
-NTSTATUS cluster_message_send(struct server_id server, uint32_t msg_type, DATA_BLOB *data);
+NTSTATUS cluster_message_send(struct server_id server, DATA_BLOB *data);
#endif
Modified: branches/SAMBA_4_0/source/cluster/cluster_private.h
===================================================================
--- branches/SAMBA_4_0/source/cluster/cluster_private.h 2007-02-09 01:49:26 UTC (rev 21255)
+++ branches/SAMBA_4_0/source/cluster/cluster_private.h 2007-02-09 01:52:13 UTC (rev 21256)
@@ -34,8 +34,7 @@
struct messaging_context *msg, struct server_id server,
cluster_message_fn_t handler);
NTSTATUS (*message_send)(struct cluster_ops *ops,
- struct server_id server, uint32_t msg_type,
- DATA_BLOB *data);
+ struct server_id server, DATA_BLOB *data);
void *private; /* backend state */
};
Modified: branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb.c
===================================================================
--- branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb.c 2007-02-09 01:49:26 UTC (rev 21255)
+++ branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb.c 2007-02-09 01:52:13 UTC (rev 21256)
@@ -162,6 +162,15 @@
}
/*
+ return the number of nodes
+*/
+uint32_t ctdb_get_num_nodes(struct ctdb_context *ctdb)
+{
+ return ctdb->num_nodes;
+}
+
+
+/*
start the protocol going
*/
int ctdb_start(struct ctdb_context *ctdb)
Modified: branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_message.c
===================================================================
--- branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_message.c 2007-02-09 01:49:26 UTC (rev 21255)
+++ branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_message.c 2007-02-09 01:52:13 UTC (rev 21256)
@@ -54,7 +54,7 @@
send a ctdb message
*/
int ctdb_send_message(struct ctdb_context *ctdb, uint32_t vnn,
- uint32_t srvid, uint32_t msg_type, TDB_DATA data)
+ uint32_t srvid, TDB_DATA data)
{
struct ctdb_req_message *r;
int len;
Modified: branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c
===================================================================
--- branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c 2007-02-09 01:49:26 UTC (rev 21255)
+++ branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c 2007-02-09 01:52:13 UTC (rev 21256)
@@ -159,8 +159,7 @@
send a ctdb message to another node
*/
static NTSTATUS ctdb_message_send(struct cluster_ops *ops,
- struct server_id server, uint32_t msg_type,
- DATA_BLOB *data)
+ struct server_id server, DATA_BLOB *data)
{
struct cluster_state *state = ops->private;
struct ctdb_context *ctdb = state->ctdb;
@@ -170,7 +169,7 @@
tdata.dptr = data->data;
tdata.dsize = data->length;
- ret = ctdb_send_message(ctdb, server.node, server.id, msg_type, tdata);
+ ret = ctdb_send_message(ctdb, server.node, server.id, tdata);
if (ret != 0) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
Modified: branches/SAMBA_4_0/source/cluster/ctdb/include/ctdb.h
===================================================================
--- branches/SAMBA_4_0/source/cluster/ctdb/include/ctdb.h 2007-02-09 01:49:26 UTC (rev 21255)
+++ branches/SAMBA_4_0/source/cluster/ctdb/include/ctdb.h 2007-02-09 01:52:13 UTC (rev 21256)
@@ -127,6 +127,11 @@
/* return vnn of this node */
uint32_t ctdb_get_vnn(struct ctdb_context *ctdb);
+/*
+ return the number of nodes
+*/
+uint32_t ctdb_get_num_nodes(struct ctdb_context *ctdb);
+
/* setup a handler for ctdb messages */
typedef void (*ctdb_message_fn_t)(struct ctdb_context *, uint32_t srvid,
TDB_DATA data, void *);
@@ -135,6 +140,6 @@
/* send a ctdb message */
int ctdb_send_message(struct ctdb_context *ctdb, uint32_t vnn,
- uint32_t srvid, uint32_t msg_type, TDB_DATA data);
+ uint32_t srvid, TDB_DATA data);
#endif
Modified: branches/SAMBA_4_0/source/cluster/local.c
===================================================================
--- branches/SAMBA_4_0/source/cluster/local.c 2007-02-09 01:49:26 UTC (rev 21255)
+++ branches/SAMBA_4_0/source/cluster/local.c 2007-02-09 01:52:13 UTC (rev 21256)
@@ -88,8 +88,7 @@
dummy message send
*/
static NTSTATUS local_message_send(struct cluster_ops *ops,
- struct server_id server, uint32_t msg_type,
- DATA_BLOB *data)
+ struct server_id server, DATA_BLOB *data)
{
return NT_STATUS_INVALID_DEVICE_REQUEST;
}
Modified: branches/SAMBA_4_0/source/lib/messaging/messaging.c
===================================================================
--- branches/SAMBA_4_0/source/lib/messaging/messaging.c 2007-02-09 01:49:26 UTC (rev 21255)
+++ branches/SAMBA_4_0/source/lib/messaging/messaging.c 2007-02-09 01:52:13 UTC (rev 21256)
@@ -430,7 +430,7 @@
if (!cluster_node_equal(&msg->server_id, &server)) {
/* the destination is on another node - dispatch via
the cluster layer */
- status = cluster_message_send(server, msg_type, &rec->packet);
+ status = cluster_message_send(server, &rec->packet);
talloc_free(rec);
return status;
}
More information about the samba-cvs
mailing list