diff options
author | Amitay Isaacs <amitay@gmail.com> | 2017-03-02 15:39:29 +1100 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2017-06-29 10:34:26 +0200 |
commit | 94af277c489f0ad861c6923d91286f46f9e4d29b (patch) | |
tree | abc3184d45c6f3a173091730b76b3361265ef854 /ctdb/common/common.h | |
parent | 2975de6ffbb412e241ed44d64dd549de76c1d03a (diff) | |
download | samba-94af277c489f0ad861c6923d91286f46f9e4d29b.tar.gz |
ctdb-daemon: Add accessors for CTDB_DB_FLAGS_PERSISTENT flag
This allows to differentiate between the two database models.
ctdb_db_persistent() - replicated and permanent
ctdb_db_volatile() - distributed and temporary
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/common/common.h')
-rw-r--r-- | ctdb/common/common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ctdb/common/common.h b/ctdb/common/common.h index 0423c5e2538..5c823a14e6f 100644 --- a/ctdb/common/common.h +++ b/ctdb/common/common.h @@ -44,6 +44,9 @@ int ctdb_db_tdb_flags(uint8_t db_flags, bool with_valgrind, bool with_mutex); struct ctdb_db_context *ctdb_db_handle(struct ctdb_context *ctdb, const char *name); +bool ctdb_db_persistent(struct ctdb_db_context *ctdb_db); +bool ctdb_db_volatile(struct ctdb_db_context *ctdb_db); + uint32_t ctdb_lmaster(struct ctdb_context *ctdb, const TDB_DATA *key); int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db, |