diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-04-04 04:57:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:47 -0500 |
commit | a78be2150ba06738f4c7e85ca2980200d4a3c533 (patch) | |
tree | bc30c417b22a8cd51692635134f4c865a6023235 /source4/cluster/ctdb/include/ctdb_private.h | |
parent | 690df3ccd98c586610cc5e528b05f7863b334a3c (diff) | |
download | samba-a78be2150ba06738f4c7e85ca2980200d4a3c533.tar.gz samba-a78be2150ba06738f4c7e85ca2980200d4a3c533.tar.bz2 samba-a78be2150ba06738f4c7e85ca2980200d4a3c533.zip |
r22070: merge in the changes from the bzr ctdb tree, and convert the brlock
ctdb backend to use the updated multi-database API
(This used to be commit 44dcac9e4d81bfc078512248967b6240db9d1bd8)
Diffstat (limited to 'source4/cluster/ctdb/include/ctdb_private.h')
-rw-r--r-- | source4/cluster/ctdb/include/ctdb_private.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/source4/cluster/ctdb/include/ctdb_private.h b/source4/cluster/ctdb/include/ctdb_private.h index c863781c50..1e2244ff7d 100644 --- a/source4/cluster/ctdb/include/ctdb_private.h +++ b/source4/cluster/ctdb/include/ctdb_private.h @@ -76,6 +76,7 @@ struct ctdb_upcalls { void (*node_connected)(struct ctdb_node *); }; + /* main state of the ctdb daemon */ struct ctdb_context { struct event_context *ev; @@ -87,15 +88,23 @@ struct ctdb_context { unsigned flags; struct idr_context *idr; struct ctdb_node **nodes; /* array of nodes in the cluster - indexed by vnn */ - struct ctdb_registered_call *calls; /* list of registered calls */ char *err_msg; - struct tdb_wrap *ltdb; const struct ctdb_methods *methods; /* transport methods */ const struct ctdb_upcalls *upcalls; /* transport upcalls */ void *private; /* private to transport */ unsigned max_lacount; ctdb_message_fn_t message_handler; void *message_private; + struct ctdb_db_context *db_list; +}; + +struct ctdb_db_context { + struct ctdb_db_context *next, *prev; + struct ctdb_context *ctdb; + uint32_t db_id; + const char *db_name; + struct tdb_wrap *ltdb; + struct ctdb_registered_call *calls; /* list of registered calls */ }; #define CTDB_NO_MEMORY(ctdb, p) do { if (!(p)) { \ @@ -157,6 +166,7 @@ struct ctdb_req_header { struct ctdb_req_call { struct ctdb_req_header hdr; + uint32_t db_id; uint32_t callid; uint32_t keylen; uint32_t calldatalen; @@ -184,6 +194,7 @@ struct ctdb_reply_redirect { struct ctdb_req_dmaster { struct ctdb_req_header hdr; + uint32_t db_id; uint32_t dmaster; uint32_t keylen; uint32_t datalen; @@ -220,9 +231,9 @@ void ctdb_reply_error(struct ctdb_context *ctdb, struct ctdb_req_header *hdr); void ctdb_reply_redirect(struct ctdb_context *ctdb, struct ctdb_req_header *hdr); uint32_t ctdb_lmaster(struct ctdb_context *ctdb, const TDB_DATA *key); -int ctdb_ltdb_fetch(struct ctdb_context *ctdb, +int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db, TDB_DATA key, struct ctdb_ltdb_header *header, TDB_DATA *data); -int ctdb_ltdb_store(struct ctdb_context *ctdb, TDB_DATA key, +int ctdb_ltdb_store(struct ctdb_db_context *ctdb_db, TDB_DATA key, struct ctdb_ltdb_header *header, TDB_DATA data); void ctdb_queue_packet(struct ctdb_context *ctdb, struct ctdb_req_header *hdr); |