diff options
author | Amitay Isaacs <amitay@gmail.com> | 2017-03-02 15:44:48 +1100 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2017-06-29 10:34:26 +0200 |
commit | d0fa710ea10049c69ec8cb155444a35ecad4b538 (patch) | |
tree | f6793005ffa38fc3bd3d1c62e5038055276dcb09 /ctdb/common/ctdb_ltdb.c | |
parent | 94af277c489f0ad861c6923d91286f46f9e4d29b (diff) | |
download | samba-d0fa710ea10049c69ec8cb155444a35ecad4b538.tar.gz |
ctdb-daemon: Add accessors for CTDB_DB_FLAGS_READONLY flag
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/common/ctdb_ltdb.c')
-rw-r--r-- | ctdb/common/ctdb_ltdb.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ctdb/common/ctdb_ltdb.c b/ctdb/common/ctdb_ltdb.c index 37ffda8f070..818ac76d387 100644 --- a/ctdb/common/ctdb_ltdb.c +++ b/ctdb/common/ctdb_ltdb.c @@ -88,6 +88,21 @@ bool ctdb_db_volatile(struct ctdb_db_context *ctdb_db) return !ctdb_db->persistent; } +bool ctdb_db_readonly(struct ctdb_db_context *ctdb_db) +{ + return ctdb_db->readonly; +} + +void ctdb_db_set_readonly(struct ctdb_db_context *ctdb_db) +{ + ctdb_db->readonly = true; +} + +void ctdb_db_reset_readonly(struct ctdb_db_context *ctdb_db) +{ + ctdb_db->readonly = false; +} + /* return the lmaster given a key */ |