diff options
| author | Ronnie Sahlberg <sahlberg@ronnie> | 2007-04-29 22:51:56 +1000 |
|---|---|---|
| committer | Ronnie Sahlberg <sahlberg@ronnie> | 2007-04-29 22:51:56 +1000 |
| commit | 77ce5750b2a18c1b4a82f3bc982fbb3ea465b60c (patch) | |
| tree | 3d79e5567ab0d9dadbcd7cb6850c999bb713956b /ctdb/include | |
| parent | 1af701291f8a6b8a04ed201ff862e1a7813dff05 (diff) | |
add a new "recovery mode" field to ctdb.
while recovery is in progress the daemon will discard all CTDB_REQ_CALL
and rely on clients retransmitting them
add new controls to get/set the recovery mode
(This used to be ctdb commit 41458a61577885ac49150f830e92e93e634c5411)
Diffstat (limited to 'ctdb/include')
| -rw-r--r-- | ctdb/include/ctdb.h | 12 | ||||
| -rw-r--r-- | ctdb/include/ctdb_private.h | 5 |
2 files changed, 16 insertions, 1 deletions
diff --git a/ctdb/include/ctdb.h b/ctdb/include/ctdb.h index f7eb16b75e..aa2f31fa34 100644 --- a/ctdb/include/ctdb.h +++ b/ctdb/include/ctdb.h @@ -276,4 +276,16 @@ int ctdb_cleardb(struct ctdb_context *ctdb, uint32_t destnode, TALLOC_CTX *mem_c */ int ctdb_pulldb(struct ctdb_context *ctdb, uint32_t destnode, TALLOC_CTX *mem_ctx, uint32_t dbid, uint32_t from_vnn); + +#define CTDB_RECOVERY_NORMAL 0 +#define CTDB_RECOVERY_ACTIVE 1 +/* + get the recovery mode of a remote node + */ +int ctdb_getrecmode(struct ctdb_context *ctdb, uint32_t destnode, uint32_t *recmode); +/* + set the recovery mode of a remote node + */ +int ctdb_setrecmode(struct ctdb_context *ctdb, uint32_t destnode, uint32_t recmode); + #endif diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index ce47f9948d..73de824f33 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -173,6 +173,7 @@ struct ctdb_vnn_map { /* main state of the ctdb daemon */ struct ctdb_context { struct event_context *ev; + uint32_t recovery_mode; struct ctdb_address address; const char *name; const char *db_directory; @@ -258,7 +259,9 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS, CTDB_CONTROL_GET_KEYS, CTDB_CONTROL_SET_DMASTER, CTDB_CONTROL_CLEAR_DB, - CTDB_CONTROL_PULL_DB}; + CTDB_CONTROL_PULL_DB, + CTDB_CONTROL_GET_RECMODE, + CTDB_CONTROL_SET_RECMODE}; enum call_state {CTDB_CALL_WAIT, CTDB_CALL_DONE, CTDB_CALL_ERROR}; |
