diff options
| author | Andrew Tridgell <tridge@samba.org> | 2007-06-04 19:53:19 +1000 |
|---|---|---|
| committer | Andrew Tridgell <tridge@samba.org> | 2007-06-04 19:53:19 +1000 |
| commit | dbb2ec43dda8287996dd110ff610364f0bfac712 (patch) | |
| tree | 5716c432a8921e7b4862406fb0fc8c104949bfee /ctdb/include | |
| parent | f1d81386e684c8adb6cadd2ae56aa166aef6b5f2 (diff) | |
added tunables settable using ctdb command line tool
(This used to be ctdb commit 73d440f8cb19373cfad7a2f0f0ca4f963c57ff29)
Diffstat (limited to 'ctdb/include')
| -rw-r--r-- | ctdb/include/ctdb.h | 18 | ||||
| -rw-r--r-- | ctdb/include/ctdb_private.h | 35 |
2 files changed, 53 insertions, 0 deletions
diff --git a/ctdb/include/ctdb.h b/ctdb/include/ctdb.h index d8e32161d2..74039420fa 100644 --- a/ctdb/include/ctdb.h +++ b/ctdb/include/ctdb.h @@ -340,4 +340,22 @@ int ctdb_ctrl_thaw(struct ctdb_context *ctdb, struct timeval timeout, uint32_t d int ctdb_ctrl_getvnn(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode); +int ctdb_ctrl_get_tunable(struct ctdb_context *ctdb, + struct timeval timeout, + uint32_t destnode, + const char *name, uint32_t *value); + +int ctdb_ctrl_set_tunable(struct ctdb_context *ctdb, + struct timeval timeout, + uint32_t destnode, + const char *name, uint32_t value); + +int ctdb_ctrl_list_tunables(struct ctdb_context *ctdb, + struct timeval timeout, + uint32_t destnode, + TALLOC_CTX *mem_ctx, + const char ***list, uint32_t *count); + + + #endif diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index d7f2b32cea..75126b2115 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -400,6 +400,9 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0, CTDB_CONTROL_TCP_ADD = 45, CTDB_CONTROL_TCP_REMOVE = 46, CTDB_CONTROL_STARTUP = 47, + CTDB_CONTROL_SET_TUNABLE = 48, + CTDB_CONTROL_GET_TUNABLE = 49, + CTDB_CONTROL_LIST_TUNABLES = 50, }; /* @@ -822,6 +825,33 @@ struct ctdb_control_set_dmaster { uint32_t dmaster; }; +/* + structure for setting a tunable + */ +struct ctdb_control_set_tunable { + uint32_t value; + uint32_t length; + uint8_t name[1]; +}; + +/* + structure for getting a tunable + */ +struct ctdb_control_get_tunable { + uint32_t length; + uint8_t name[1]; +}; + +/* + structure for listing tunables + */ +struct ctdb_control_list_tunable { + uint32_t length; + /* returns a : separated list of tunable names */ + uint8_t data[1]; +}; + + /* table that contains a list of all nodes a ctdb knows about and their status */ @@ -936,4 +966,9 @@ bool ctdb_recovery_lock(struct ctdb_context *ctdb, bool keep); int ctdb_set_recovery_lock_file(struct ctdb_context *ctdb, const char *file); +int32_t ctdb_control_get_tunable(struct ctdb_context *ctdb, TDB_DATA indata, + TDB_DATA *outdata); +int32_t ctdb_control_set_tunable(struct ctdb_context *ctdb, TDB_DATA indata); +int32_t ctdb_control_list_tunables(struct ctdb_context *ctdb, TDB_DATA *outdata); + #endif |
