return ctdb_control_transaction_commit(ctdb, *(uint32_t *)indata.dptr);
case CTDB_CONTROL_WIPE_DATABASE:
- CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_control_transdb));
+ CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_transdb));
return ctdb_control_wipe_database(ctdb, indata);
case CTDB_CONTROL_UPTIME:
return ctdb_control_db_thaw(ctdb, *(uint32_t *)indata.dptr);
case CTDB_CONTROL_DB_TRANSACTION_START:
- CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_control_transdb));
+ CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_transdb));
return ctdb_control_db_transaction_start(ctdb, indata);
case CTDB_CONTROL_DB_TRANSACTION_COMMIT:
- CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_control_transdb));
+ CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_transdb));
return ctdb_control_db_transaction_commit(ctdb, indata);
case CTDB_CONTROL_DB_TRANSACTION_CANCEL:
int32_t ctdb_control_db_transaction_start(struct ctdb_context *ctdb,
TDB_DATA indata)
{
- struct ctdb_control_transdb *w =
- (struct ctdb_control_transdb *)indata.dptr;
+ struct ctdb_transdb *w =
+ (struct ctdb_transdb *)indata.dptr;
struct ctdb_db_context *ctdb_db;
struct db_start_transaction_state state;
return -1;
}
- state.transaction_id = w->transaction_id;
+ state.transaction_id = w->tid;
state.transaction_started = true;
return db_start_transaction(ctdb_db, &state);
int32_t ctdb_control_db_transaction_commit(struct ctdb_context *ctdb,
TDB_DATA indata)
{
- struct ctdb_control_transdb *w =
- (struct ctdb_control_transdb *)indata.dptr;
+ struct ctdb_transdb *w =
+ (struct ctdb_transdb *)indata.dptr;
struct ctdb_db_context *ctdb_db;
struct db_commit_transaction_state state;
int healthy_nodes, i;
}
}
- state.transaction_id = w->transaction_id;
+ state.transaction_id = w->tid;
state.healthy_nodes = healthy_nodes;
return db_commit_transaction(ctdb_db, &state);
*/
int32_t ctdb_control_wipe_database(struct ctdb_context *ctdb, TDB_DATA indata)
{
- struct ctdb_control_transdb w = *(struct ctdb_control_transdb *)indata.dptr;
+ struct ctdb_transdb w = *(struct ctdb_transdb *)indata.dptr;
struct ctdb_db_context *ctdb_db;
ctdb_db = find_ctdb_db(ctdb, w.db_id);
return -1;
}
- if (w.transaction_id != ctdb_db->freeze_transaction_id) {
- DEBUG(DEBUG_ERR,(__location__ " incorrect transaction id 0x%x in commit\n", w.transaction_id));
+ if (w.tid != ctdb_db->freeze_transaction_id) {
+ DEBUG(DEBUG_ERR,(__location__ " incorrect transaction id 0x%x in commit\n", w.tid));
return -1;
}
int ret;
struct ctdb_context *ctdb = rec->ctdb;
TDB_DATA data;
- struct ctdb_control_transdb w;
+ struct ctdb_transdb w;
uint32_t *nodes;
recdb = create_recdb(ctdb, mem_ctx);
/* wipe all the remote databases. This is safe as we are in a transaction */
w.db_id = dbid;
- w.transaction_id = transaction_id;
+ w.tid = transaction_id;
data.dptr = (void *)&w;
data.dsize = sizeof(w);
struct ctdb_node_map_old *nodemap=NULL;
struct ctdb_vnn_map *vnnmap=NULL;
int i, fh;
- struct ctdb_control_transdb w;
+ struct ctdb_transdb w;
uint32_t *nodes;
uint32_t generation;
struct tm *tm;
w.db_id = ctdb_db->db_id;
- w.transaction_id = generation;
+ w.tid = generation;
data.dptr = (void *)&w;
data.dsize = sizeof(w);
struct ctdb_node_map_old *nodemap = NULL;
struct ctdb_vnn_map *vnnmap = NULL;
int i;
- struct ctdb_control_transdb w;
+ struct ctdb_transdb w;
uint32_t *nodes;
uint32_t generation;
uint8_t flags;
}
w.db_id = ctdb_db->db_id;
- w.transaction_id = generation;
+ w.tid = generation;
data.dptr = (void *)&w;
data.dsize = sizeof(w);