mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
ctdb-daemon: Rename struct ctdb_tunable to ctdb_tunable_list
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
ca481354c0
commit
cb0be4126f
@ -3030,10 +3030,10 @@ int ctdb_ctrl_modflags(struct ctdb_context *ctdb, struct timeval timeout, uint32
|
||||
/*
|
||||
get all tunables
|
||||
*/
|
||||
int ctdb_ctrl_get_all_tunables(struct ctdb_context *ctdb,
|
||||
struct timeval timeout,
|
||||
int ctdb_ctrl_get_all_tunables(struct ctdb_context *ctdb,
|
||||
struct timeval timeout,
|
||||
uint32_t destnode,
|
||||
struct ctdb_tunable *tunables)
|
||||
struct ctdb_tunable_list *tunables)
|
||||
{
|
||||
TDB_DATA outdata;
|
||||
int ret;
|
||||
@ -3049,10 +3049,10 @@ int ctdb_ctrl_get_all_tunables(struct ctdb_context *ctdb,
|
||||
if (outdata.dsize != sizeof(*tunables)) {
|
||||
DEBUG(DEBUG_ERR,(__location__ " bad data size %u in ctdb_ctrl_get_all_tunables should be %u\n",
|
||||
(unsigned)outdata.dsize, (unsigned)sizeof(*tunables)));
|
||||
return -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
*tunables = *(struct ctdb_tunable *)outdata.dptr;
|
||||
*tunables = *(struct ctdb_tunable_list *)outdata.dptr;
|
||||
talloc_free(outdata.dptr);
|
||||
return 0;
|
||||
}
|
||||
|
@ -397,7 +397,7 @@ int ctdb_ctrl_modflags(struct ctdb_context *ctdb,
|
||||
|
||||
int ctdb_ctrl_get_all_tunables(struct ctdb_context *ctdb,
|
||||
struct timeval timeout, uint32_t destnode,
|
||||
struct ctdb_tunable *tunables);
|
||||
struct ctdb_tunable_list *tunables);
|
||||
|
||||
int ctdb_ctrl_add_public_ip(struct ctdb_context *ctdb,
|
||||
struct timeval timeout, uint32_t destnode,
|
||||
|
@ -301,7 +301,7 @@ struct ctdb_context {
|
||||
TALLOC_CTX *tickle_update_context;
|
||||
TALLOC_CTX *keepalive_ctx;
|
||||
TALLOC_CTX *check_public_ifaces_ctx;
|
||||
struct ctdb_tunable tunable;
|
||||
struct ctdb_tunable_list tunable;
|
||||
enum ctdb_freeze_mode freeze_mode[NUM_DB_PRIORITIES+1];
|
||||
struct ctdb_freeze_handle *freeze_handles[NUM_DB_PRIORITIES+1];
|
||||
bool freeze_transaction_started;
|
||||
|
@ -845,7 +845,7 @@ struct ctdb_tickle_list_old {
|
||||
};
|
||||
|
||||
/* all tunable variables go in here */
|
||||
struct ctdb_tunable {
|
||||
struct ctdb_tunable_list {
|
||||
uint32_t max_redirect_count;
|
||||
uint32_t seqnum_interval; /* unit is ms */
|
||||
uint32_t control_timeout;
|
||||
|
@ -35,64 +35,64 @@ static const struct {
|
||||
size_t offset;
|
||||
bool obsolete;
|
||||
} tunable_map[] = {
|
||||
{ "MaxRedirectCount", 3, offsetof(struct ctdb_tunable, max_redirect_count), false },
|
||||
{ "SeqnumInterval", 1000, offsetof(struct ctdb_tunable, seqnum_interval), false },
|
||||
{ "ControlTimeout", 60, offsetof(struct ctdb_tunable, control_timeout), false },
|
||||
{ "TraverseTimeout", 20, offsetof(struct ctdb_tunable, traverse_timeout), false },
|
||||
{ "KeepaliveInterval", 5, offsetof(struct ctdb_tunable, keepalive_interval), false },
|
||||
{ "KeepaliveLimit", 5, offsetof(struct ctdb_tunable, keepalive_limit), false },
|
||||
{ "RecoverTimeout", 120, offsetof(struct ctdb_tunable, recover_timeout), false },
|
||||
{ "RecoverInterval", 1, offsetof(struct ctdb_tunable, recover_interval), false },
|
||||
{ "ElectionTimeout", 3, offsetof(struct ctdb_tunable, election_timeout), false },
|
||||
{ "TakeoverTimeout", 9, offsetof(struct ctdb_tunable, takeover_timeout), false },
|
||||
{ "MonitorInterval", 15, offsetof(struct ctdb_tunable, monitor_interval), false },
|
||||
{ "TickleUpdateInterval",20, offsetof(struct ctdb_tunable, tickle_update_interval), false },
|
||||
{ "EventScriptTimeout", 30, offsetof(struct ctdb_tunable, script_timeout), false },
|
||||
{ "EventScriptTimeoutCount", 20, offsetof(struct ctdb_tunable, script_timeout_count), false },
|
||||
{ "EventScriptUnhealthyOnTimeout", 0, offsetof(struct ctdb_tunable, script_unhealthy_on_timeout), true },
|
||||
{ "RecoveryGracePeriod", 120, offsetof(struct ctdb_tunable, recovery_grace_period), false },
|
||||
{ "RecoveryBanPeriod", 300, offsetof(struct ctdb_tunable, recovery_ban_period), false },
|
||||
{ "DatabaseHashSize", 100001, offsetof(struct ctdb_tunable, database_hash_size), false },
|
||||
{ "DatabaseMaxDead", 5, offsetof(struct ctdb_tunable, database_max_dead), false },
|
||||
{ "RerecoveryTimeout", 10, offsetof(struct ctdb_tunable, rerecovery_timeout), false },
|
||||
{ "EnableBans", 1, offsetof(struct ctdb_tunable, enable_bans), false },
|
||||
{ "DeterministicIPs", 0, offsetof(struct ctdb_tunable, deterministic_public_ips), false },
|
||||
{ "LCP2PublicIPs", 1, offsetof(struct ctdb_tunable, lcp2_public_ip_assignment), false },
|
||||
{ "ReclockPingPeriod", 60, offsetof(struct ctdb_tunable, reclock_ping_period), false },
|
||||
{ "NoIPFailback", 0, offsetof(struct ctdb_tunable, no_ip_failback), false },
|
||||
{ "DisableIPFailover", 0, offsetof(struct ctdb_tunable, disable_ip_failover), false },
|
||||
{ "VerboseMemoryNames", 0, offsetof(struct ctdb_tunable, verbose_memory_names), false },
|
||||
{ "RecdPingTimeout", 60, offsetof(struct ctdb_tunable, recd_ping_timeout), false },
|
||||
{ "RecdFailCount", 10, offsetof(struct ctdb_tunable, recd_ping_failcount), false },
|
||||
{ "LogLatencyMs", 0, offsetof(struct ctdb_tunable, log_latency_ms), false },
|
||||
{ "RecLockLatencyMs", 1000, offsetof(struct ctdb_tunable, reclock_latency_ms), false },
|
||||
{ "RecoveryDropAllIPs", 120, offsetof(struct ctdb_tunable, recovery_drop_all_ips), false },
|
||||
{ "VerifyRecoveryLock", 1, offsetof(struct ctdb_tunable, verify_recovery_lock), true },
|
||||
{ "VacuumInterval", 10, offsetof(struct ctdb_tunable, vacuum_interval), false },
|
||||
{ "VacuumMaxRunTime", 120, offsetof(struct ctdb_tunable, vacuum_max_run_time), false },
|
||||
{ "RepackLimit", 10000, offsetof(struct ctdb_tunable, repack_limit), false },
|
||||
{ "VacuumLimit", 5000, offsetof(struct ctdb_tunable, vacuum_limit), false },
|
||||
{ "VacuumFastPathCount", 60, offsetof(struct ctdb_tunable, vacuum_fast_path_count), false },
|
||||
{ "MaxQueueDropMsg", 1000000, offsetof(struct ctdb_tunable, max_queue_depth_drop_msg), false },
|
||||
{ "AllowUnhealthyDBRead", 0, offsetof(struct ctdb_tunable, allow_unhealthy_db_read), false },
|
||||
{ "StatHistoryInterval", 1, offsetof(struct ctdb_tunable, stat_history_interval), false },
|
||||
{ "DeferredAttachTO", 120, offsetof(struct ctdb_tunable, deferred_attach_timeout), false },
|
||||
{ "AllowClientDBAttach", 1, offsetof(struct ctdb_tunable, allow_client_db_attach), false },
|
||||
{ "RecoverPDBBySeqNum", 1, offsetof(struct ctdb_tunable, recover_pdb_by_seqnum), false },
|
||||
{ "DeferredRebalanceOnNodeAdd", 300, offsetof(struct ctdb_tunable, deferred_rebalance_on_node_add) },
|
||||
{ "FetchCollapse", 1, offsetof(struct ctdb_tunable, fetch_collapse) },
|
||||
{ "HopcountMakeSticky", 50, offsetof(struct ctdb_tunable, hopcount_make_sticky) },
|
||||
{ "StickyDuration", 600, offsetof(struct ctdb_tunable, sticky_duration) },
|
||||
{ "StickyPindown", 200, offsetof(struct ctdb_tunable, sticky_pindown) },
|
||||
{ "NoIPTakeover", 0, offsetof(struct ctdb_tunable, no_ip_takeover), false },
|
||||
{ "DBRecordCountWarn", 100000, offsetof(struct ctdb_tunable, db_record_count_warn), false },
|
||||
{ "DBRecordSizeWarn", 10000000, offsetof(struct ctdb_tunable, db_record_size_warn), false },
|
||||
{ "DBSizeWarn", 100000000, offsetof(struct ctdb_tunable, db_size_warn), false },
|
||||
{ "PullDBPreallocation", 10*1024*1024, offsetof(struct ctdb_tunable, pulldb_preallocation_size), false },
|
||||
{ "NoIPHostOnAllDisabled", 0, offsetof(struct ctdb_tunable, no_ip_host_on_all_disabled), false },
|
||||
{ "Samba3AvoidDeadlocks", 0, offsetof(struct ctdb_tunable, samba3_hack), false },
|
||||
{ "TDBMutexEnabled", 0, offsetof(struct ctdb_tunable, mutex_enabled), false },
|
||||
{ "LockProcessesPerDB", 200, offsetof(struct ctdb_tunable, lock_processes_per_db), false },
|
||||
{ "MaxRedirectCount", 3, offsetof(struct ctdb_tunable_list, max_redirect_count), false },
|
||||
{ "SeqnumInterval", 1000, offsetof(struct ctdb_tunable_list, seqnum_interval), false },
|
||||
{ "ControlTimeout", 60, offsetof(struct ctdb_tunable_list, control_timeout), false },
|
||||
{ "TraverseTimeout", 20, offsetof(struct ctdb_tunable_list, traverse_timeout), false },
|
||||
{ "KeepaliveInterval", 5, offsetof(struct ctdb_tunable_list, keepalive_interval), false },
|
||||
{ "KeepaliveLimit", 5, offsetof(struct ctdb_tunable_list, keepalive_limit), false },
|
||||
{ "RecoverTimeout", 120, offsetof(struct ctdb_tunable_list, recover_timeout), false },
|
||||
{ "RecoverInterval", 1, offsetof(struct ctdb_tunable_list, recover_interval), false },
|
||||
{ "ElectionTimeout", 3, offsetof(struct ctdb_tunable_list, election_timeout), false },
|
||||
{ "TakeoverTimeout", 9, offsetof(struct ctdb_tunable_list, takeover_timeout), false },
|
||||
{ "MonitorInterval", 15, offsetof(struct ctdb_tunable_list, monitor_interval), false },
|
||||
{ "TickleUpdateInterval",20, offsetof(struct ctdb_tunable_list, tickle_update_interval), false },
|
||||
{ "EventScriptTimeout", 30, offsetof(struct ctdb_tunable_list, script_timeout), false },
|
||||
{ "EventScriptTimeoutCount", 20, offsetof(struct ctdb_tunable_list, script_timeout_count), false },
|
||||
{ "EventScriptUnhealthyOnTimeout", 0, offsetof(struct ctdb_tunable_list, script_unhealthy_on_timeout), true },
|
||||
{ "RecoveryGracePeriod", 120, offsetof(struct ctdb_tunable_list, recovery_grace_period), false },
|
||||
{ "RecoveryBanPeriod", 300, offsetof(struct ctdb_tunable_list, recovery_ban_period), false },
|
||||
{ "DatabaseHashSize", 100001, offsetof(struct ctdb_tunable_list, database_hash_size), false },
|
||||
{ "DatabaseMaxDead", 5, offsetof(struct ctdb_tunable_list, database_max_dead), false },
|
||||
{ "RerecoveryTimeout", 10, offsetof(struct ctdb_tunable_list, rerecovery_timeout), false },
|
||||
{ "EnableBans", 1, offsetof(struct ctdb_tunable_list, enable_bans), false },
|
||||
{ "DeterministicIPs", 0, offsetof(struct ctdb_tunable_list, deterministic_public_ips), false },
|
||||
{ "LCP2PublicIPs", 1, offsetof(struct ctdb_tunable_list, lcp2_public_ip_assignment), false },
|
||||
{ "ReclockPingPeriod", 60, offsetof(struct ctdb_tunable_list, reclock_ping_period), false },
|
||||
{ "NoIPFailback", 0, offsetof(struct ctdb_tunable_list, no_ip_failback), false },
|
||||
{ "DisableIPFailover", 0, offsetof(struct ctdb_tunable_list, disable_ip_failover), false },
|
||||
{ "VerboseMemoryNames", 0, offsetof(struct ctdb_tunable_list, verbose_memory_names), false },
|
||||
{ "RecdPingTimeout", 60, offsetof(struct ctdb_tunable_list, recd_ping_timeout), false },
|
||||
{ "RecdFailCount", 10, offsetof(struct ctdb_tunable_list, recd_ping_failcount), false },
|
||||
{ "LogLatencyMs", 0, offsetof(struct ctdb_tunable_list, log_latency_ms), false },
|
||||
{ "RecLockLatencyMs", 1000, offsetof(struct ctdb_tunable_list, reclock_latency_ms), false },
|
||||
{ "RecoveryDropAllIPs", 120, offsetof(struct ctdb_tunable_list, recovery_drop_all_ips), false },
|
||||
{ "VerifyRecoveryLock", 1, offsetof(struct ctdb_tunable_list, verify_recovery_lock), true },
|
||||
{ "VacuumInterval", 10, offsetof(struct ctdb_tunable_list, vacuum_interval), false },
|
||||
{ "VacuumMaxRunTime", 120, offsetof(struct ctdb_tunable_list, vacuum_max_run_time), false },
|
||||
{ "RepackLimit", 10000, offsetof(struct ctdb_tunable_list, repack_limit), false },
|
||||
{ "VacuumLimit", 5000, offsetof(struct ctdb_tunable_list, vacuum_limit), false },
|
||||
{ "VacuumFastPathCount", 60, offsetof(struct ctdb_tunable_list, vacuum_fast_path_count), false },
|
||||
{ "MaxQueueDropMsg", 1000000, offsetof(struct ctdb_tunable_list, max_queue_depth_drop_msg), false },
|
||||
{ "AllowUnhealthyDBRead", 0, offsetof(struct ctdb_tunable_list, allow_unhealthy_db_read), false },
|
||||
{ "StatHistoryInterval", 1, offsetof(struct ctdb_tunable_list, stat_history_interval), false },
|
||||
{ "DeferredAttachTO", 120, offsetof(struct ctdb_tunable_list, deferred_attach_timeout), false },
|
||||
{ "AllowClientDBAttach", 1, offsetof(struct ctdb_tunable_list, allow_client_db_attach), false },
|
||||
{ "RecoverPDBBySeqNum", 1, offsetof(struct ctdb_tunable_list, recover_pdb_by_seqnum), false },
|
||||
{ "DeferredRebalanceOnNodeAdd", 300, offsetof(struct ctdb_tunable_list, deferred_rebalance_on_node_add) },
|
||||
{ "FetchCollapse", 1, offsetof(struct ctdb_tunable_list, fetch_collapse) },
|
||||
{ "HopcountMakeSticky", 50, offsetof(struct ctdb_tunable_list, hopcount_make_sticky) },
|
||||
{ "StickyDuration", 600, offsetof(struct ctdb_tunable_list, sticky_duration) },
|
||||
{ "StickyPindown", 200, offsetof(struct ctdb_tunable_list, sticky_pindown) },
|
||||
{ "NoIPTakeover", 0, offsetof(struct ctdb_tunable_list, no_ip_takeover), false },
|
||||
{ "DBRecordCountWarn", 100000, offsetof(struct ctdb_tunable_list, db_record_count_warn), false },
|
||||
{ "DBRecordSizeWarn", 10000000, offsetof(struct ctdb_tunable_list, db_record_size_warn), false },
|
||||
{ "DBSizeWarn", 100000000, offsetof(struct ctdb_tunable_list, db_size_warn), false },
|
||||
{ "PullDBPreallocation", 10*1024*1024, offsetof(struct ctdb_tunable_list, pulldb_preallocation_size), false },
|
||||
{ "NoIPHostOnAllDisabled", 0, offsetof(struct ctdb_tunable_list, no_ip_host_on_all_disabled), false },
|
||||
{ "Samba3AvoidDeadlocks", 0, offsetof(struct ctdb_tunable_list, samba3_hack), false },
|
||||
{ "TDBMutexEnabled", 0, offsetof(struct ctdb_tunable_list, mutex_enabled), false },
|
||||
{ "LockProcessesPerDB", 200, offsetof(struct ctdb_tunable_list, lock_processes_per_db), false },
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user