diff options
Diffstat (limited to 'source4/cluster/ctdb/include')
-rw-r--r-- | source4/cluster/ctdb/include/ctdb.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/cluster/ctdb/include/ctdb.h b/source4/cluster/ctdb/include/ctdb.h index c5b6dbc782..51eeaebedb 100644 --- a/source4/cluster/ctdb/include/ctdb.h +++ b/source4/cluster/ctdb/include/ctdb.h @@ -148,4 +148,19 @@ int ctdb_set_message_handler(struct ctdb_context *ctdb, ctdb_message_fn_t handle int ctdb_send_message(struct ctdb_context *ctdb, uint32_t vnn, uint32_t srvid, TDB_DATA data); +/* + fetch and lock a ctdb record. Underneath this will force the + dmaster for the record to be moved to the local node. + + The lock is released when is talloc_free() is called on the + returned ctdb_record_handle. +*/ +struct ctdb_record_handle *ctdb_fetch_lock(struct ctdb_db_context *ctdb_db, TDB_DATA key, TDB_DATA *data); + +/* + change the data in a record held with a ctdb_record_handle + if the new data is zero length, this implies a delete of the record + */ +int ctdb_record_store(struct ctdb_record_handle *rec, TDB_DATA data); + #endif |