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.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.h')
-rw-r--r-- | source4/cluster/ctdb/include/ctdb.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/source4/cluster/ctdb/include/ctdb.h b/source4/cluster/ctdb/include/ctdb.h index efb12c5daa..c5b6dbc782 100644 --- a/source4/cluster/ctdb/include/ctdb.h +++ b/source4/cluster/ctdb/include/ctdb.h @@ -89,6 +89,17 @@ int ctdb_set_nlist(struct ctdb_context *ctdb, const char *nlist); int ctdb_start(struct ctdb_context *ctdb); /* + attach to a ctdb database +*/ +struct ctdb_db_context *ctdb_attach(struct ctdb_context *ctdb, const char *name, int tdb_flags, + int open_flags, mode_t mode); + +/* + find an attached ctdb_db handle given a name + */ +struct ctdb_db_context *ctdb_db_handle(struct ctdb_context *ctdb, const char *name); + +/* error string for last ctdb error */ const char *ctdb_errstr(struct ctdb_context *); @@ -99,20 +110,15 @@ typedef int (*ctdb_fn_t)(struct ctdb_call_info *); /* setup a ctdb call function */ -int ctdb_set_call(struct ctdb_context *ctdb, ctdb_fn_t fn, int id); +int ctdb_set_call(struct ctdb_db_context *ctdb_db, ctdb_fn_t fn, int id); -/* - attach to a ctdb database -*/ -int ctdb_attach(struct ctdb_context *ctdb, const char *name, int tdb_flags, - int open_flags, mode_t mode); /* make a ctdb call. The associated ctdb call function will be called on the DMASTER for the given record */ -int ctdb_call(struct ctdb_context *ctdb, struct ctdb_call *call); +int ctdb_call(struct ctdb_db_context *ctdb_db, struct ctdb_call *call); /* wait for all nodes to be connected - useful for test code |