diff options
| author | Andrew Tridgell <tridge@samba.org> | 2008-01-08 17:23:27 +1100 |
|---|---|---|
| committer | Andrew Tridgell <tridge@samba.org> | 2008-01-08 17:23:27 +1100 |
| commit | 96100fcae632731bbafa831a79a48922005c8238 (patch) | |
| tree | ef442a28797321b8673d89e6688279268c7cc45a /ctdb/include | |
| parent | 41f63fe16221cda228887da3f191673debb34c36 (diff) | |
added two new ctdb commands:
ctdb vacuum : vacuums all the databases, deleting any zero length
ctdb records
ctdb repack : repacks all the databases, resulting in a perfectly
packed database with no freelist entries
(This used to be ctdb commit 3532119c84ab3247051ed6ba21ba3243ae2f6bf4)
Diffstat (limited to 'ctdb/include')
| -rw-r--r-- | ctdb/include/ctdb.h | 8 | ||||
| -rw-r--r-- | ctdb/include/ctdb_private.h | 8 |
2 files changed, 15 insertions, 1 deletions
diff --git a/ctdb/include/ctdb.h b/ctdb/include/ctdb.h index 14f75b4c82..ed38535224 100644 --- a/ctdb/include/ctdb.h +++ b/ctdb/include/ctdb.h @@ -85,6 +85,11 @@ struct ctdb_call_info { */ #define CTDB_SRVID_UNBAN_NODE 0xF600000000000000LL +/* + a message to tell the recovery daemon to fetch a set of records + */ +#define CTDB_SRVID_VACUUM_FETCH 0xF700000000000000LL + /* used on the domain socket, send a pdu to the local daemon */ #define CTDB_CURRENT_NODE 0xF0000001 @@ -225,7 +230,8 @@ int ctdb_set_message_handler(struct ctdb_context *ctdb, uint64_t srvid, int ctdb_call(struct ctdb_db_context *ctdb_db, struct ctdb_call *call); -struct ctdb_client_call_state *ctdb_call_send(struct ctdb_db_context *ctdb_db, struct ctdb_call *call); +struct ctdb_client_call_state *ctdb_call_send(struct ctdb_db_context *ctdb_db, struct ctdb_call *call, + void (*callback)(struct ctdb_client_call_state *)); int ctdb_call_recv(struct ctdb_client_call_state *state, struct ctdb_call *call); /* send a ctdb message */ diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 9582b6dade..aa4cc96c98 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -484,6 +484,7 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0, CTDB_CONTROL_TRANSACTION_START = 65, CTDB_CONTROL_TRANSACTION_COMMIT = 66, CTDB_CONTROL_WIPE_DATABASE = 67, + CTDB_CONTROL_DELETE_RECORD = 68, }; /* @@ -1187,4 +1188,11 @@ int32_t ctdb_control_transaction_start(struct ctdb_context *ctdb, uint32_t id); int32_t ctdb_control_transaction_commit(struct ctdb_context *ctdb, uint32_t id); int32_t ctdb_control_wipe_database(struct ctdb_context *ctdb, TDB_DATA indata); + +int ctdb_vacuum(struct ctdb_context *ctdb, int argc, const char **argv); +int ctdb_repack(struct ctdb_context *ctdb, int argc, const char **argv); + +int32_t ctdb_control_delete_record(struct ctdb_context *ctdb, TDB_DATA indata); + + #endif |
