mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
ctdb-daemon: Add accessors for CTDB_DB_FLAGS_REPLICATED flag
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
cb7e5e7690
commit
4e60637b31
@ -45,6 +45,7 @@ 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_replicated(struct ctdb_db_context *ctdb_db);
|
||||
bool ctdb_db_volatile(struct ctdb_db_context *ctdb_db);
|
||||
|
||||
bool ctdb_db_readonly(struct ctdb_db_context *ctdb_db);
|
||||
|
@ -92,9 +92,18 @@ bool ctdb_db_persistent(struct ctdb_db_context *ctdb_db)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ctdb_db_replicated(struct ctdb_db_context *ctdb_db)
|
||||
{
|
||||
if (ctdb_db->db_flags & CTDB_DB_FLAGS_REPLICATED) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ctdb_db_volatile(struct ctdb_db_context *ctdb_db)
|
||||
{
|
||||
if (ctdb_db->db_flags & CTDB_DB_FLAGS_PERSISTENT) {
|
||||
if ((ctdb_db->db_flags & CTDB_DB_FLAGS_PERSISTENT) ||
|
||||
(ctdb_db->db_flags & CTDB_DB_FLAGS_REPLICATED)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user