summaryrefslogtreecommitdiffstats
path: root/ctdb/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-01-29 13:59:28 +1100
committerAndrew Tridgell <tridge@samba.org>2008-01-29 13:59:28 +1100
commit146d4b0db7b0318e44cdbd08aae1482cbb570e2d (patch)
tree0fce8baf8342a268d8f7045c0d12c70a16f9d0b5 /ctdb/include
parent9c9cf30a87d8fdf2b41a928747db1dcdca8e322d (diff)
downloadsamba-146d4b0db7b0318e44cdbd08aae1482cbb570e2d.tar.gz
samba-146d4b0db7b0318e44cdbd08aae1482cbb570e2d.tar.xz
samba-146d4b0db7b0318e44cdbd08aae1482cbb570e2d.zip
merge async recovery changes from Ronnie
(This used to be ctdb commit 576e317640d25f8059114f15c6f1ebcee5e5b6e2)
Diffstat (limited to 'ctdb/include')
-rw-r--r--ctdb/include/ctdb.h11
-rw-r--r--ctdb/include/ctdb_private.h24
2 files changed, 35 insertions, 0 deletions
diff --git a/ctdb/include/ctdb.h b/ctdb/include/ctdb.h
index eee6983417..b779b94dcd 100644
--- a/ctdb/include/ctdb.h
+++ b/ctdb/include/ctdb.h
@@ -499,4 +499,15 @@ struct ctdb_client_control_state *ctdb_ctrl_uptime_send(struct ctdb_context *ctd
int ctdb_ctrl_uptime_recv(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, struct ctdb_client_control_state *state, struct ctdb_uptime **uptime);
+int ctdb_ctrl_end_recovery(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode);
+
+uint32_t *list_of_active_nodes(struct ctdb_context *ctdb,
+ struct ctdb_node_map *node_map,
+ TALLOC_CTX *mem_ctx,
+ bool include_self);
+uint32_t *list_of_vnnmap_nodes(struct ctdb_context *ctdb,
+ struct ctdb_vnn_map *vnn_map,
+ TALLOC_CTX *mem_ctx,
+ bool include_self);
+
#endif
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 57501fc68a..ab875924fa 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -488,6 +488,8 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0,
CTDB_CONTROL_WIPE_DATABASE = 67,
CTDB_CONTROL_DELETE_RECORD = 68,
CTDB_CONTROL_UPTIME = 69,
+ CTDB_CONTROL_START_RECOVERY = 70,
+ CTDB_CONTROL_END_RECOVERY = 71,
};
/*
@@ -1082,6 +1084,12 @@ int32_t ctdb_control_release_ip(struct ctdb_context *ctdb,
struct ctdb_req_control *c,
TDB_DATA indata,
bool *async_reply);
+int32_t ctdb_control_start_recovery(struct ctdb_context *ctdb,
+ struct ctdb_req_control *c,
+ bool *async_reply);
+int32_t ctdb_control_end_recovery(struct ctdb_context *ctdb,
+ struct ctdb_req_control *c,
+ bool *async_reply);
struct ctdb_public_ip {
uint32_t pnn;
@@ -1221,4 +1229,20 @@ void ctdb_unblock_signal(int signum);
int32_t ctdb_monitoring_mode(struct ctdb_context *ctdb);
int ctdb_set_child_logging(struct ctdb_context *ctdb);
+
+struct client_async_data {
+ bool dont_log_errors;
+ uint32_t count;
+ uint32_t fail_count;
+};
+void ctdb_client_async_add(struct client_async_data *data, struct ctdb_client_control_state *state);
+int ctdb_client_async_wait(struct ctdb_context *ctdb, struct client_async_data *data);
+int ctdb_client_async_control(struct ctdb_context *ctdb,
+ enum ctdb_controls opcode,
+ uint32_t *nodes,
+ struct timeval timeout,
+ bool dont_log_errors,
+ TDB_DATA data);
+
+
#endif