From: Martin Schwenke Date: Mon, 20 Aug 2018 03:35:33 +0000 (+1000) Subject: ctdb-config: Change option "no realtime" option to "realtime scheduling" X-Git-Tag: tdb-1.3.17~2029 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17068e756b9e46f7a6c77d533ef1777173bb3795;p=thirdparty%2Fsamba.git ctdb-config: Change option "no realtime" option to "realtime scheduling" Negative options can be confusing, so switch to a positive option. This was supposed to be done months ago but was forgotten. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/doc/ctdb.conf.5.xml b/ctdb/doc/ctdb.conf.5.xml index bcb67b35795..840d46d86a3 100644 --- a/ctdb/doc/ctdb.conf.5.xml +++ b/ctdb/doc/ctdb.conf.5.xml @@ -436,17 +436,17 @@ - no realtime = true|false + realtime scheduling = true|false Usually CTDB runs with real-time priority. This helps it to perform effectively on a busy system, such as when there are thousands of Samba clients. If you are running CTDB on a platform that does not support real-time - priority, you can set this to true. + priority, you can set this to false. - Default: false + Default: true diff --git a/ctdb/server/ctdb_config.c b/ctdb/server/ctdb_config.c index 58bf975abfd..1254a996b3b 100644 --- a/ctdb/server/ctdb_config.c +++ b/ctdb/server/ctdb_config.c @@ -88,8 +88,8 @@ static void setup_config_pointers(struct conf_context *conf) conf_assign_boolean_pointer(conf, LEGACY_CONF_SECTION, - LEGACY_CONF_NO_REALTIME, - &ctdb_config.no_realtime); + LEGACY_CONF_REALTIME_SCHEDULING, + &ctdb_config.realtime_scheduling); conf_assign_boolean_pointer(conf, LEGACY_CONF_SECTION, LEGACY_CONF_RECMASTER_CAPABILITY, diff --git a/ctdb/server/ctdb_config.h b/ctdb/server/ctdb_config.h index 51342a4a269..1c06e83f6c7 100644 --- a/ctdb/server/ctdb_config.h +++ b/ctdb/server/ctdb_config.h @@ -38,7 +38,7 @@ struct ctdb_config { const char *event_debug_script; /* Legacy */ - bool no_realtime; + bool realtime_scheduling; bool recmaster_capability; bool lmaster_capability; bool start_as_stopped; diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c index bfdc5e032eb..ef829e5b233 100644 --- a/ctdb/server/ctdbd.c +++ b/ctdb/server/ctdbd.c @@ -328,7 +328,7 @@ int main(int argc, const char *argv[]) ctdb->capabilities &= ~CTDB_CAP_RECMASTER; } - ctdb->do_setsched = !ctdb_config.no_realtime; + ctdb->do_setsched = ctdb_config.realtime_scheduling; /* * Miscellaneous setup diff --git a/ctdb/server/legacy_conf.c b/ctdb/server/legacy_conf.c index c435dae3dfb..5be8da0dab0 100644 --- a/ctdb/server/legacy_conf.c +++ b/ctdb/server/legacy_conf.c @@ -54,8 +54,8 @@ void legacy_conf_init(struct conf_context *conf) conf_define_boolean(conf, LEGACY_CONF_SECTION, - LEGACY_CONF_NO_REALTIME, - false, + LEGACY_CONF_REALTIME_SCHEDULING, + true, NULL); conf_define_boolean(conf, LEGACY_CONF_SECTION, diff --git a/ctdb/server/legacy_conf.h b/ctdb/server/legacy_conf.h index 6592b176df2..5551f12d76c 100644 --- a/ctdb/server/legacy_conf.h +++ b/ctdb/server/legacy_conf.h @@ -24,7 +24,7 @@ #define LEGACY_CONF_SECTION "legacy" -#define LEGACY_CONF_NO_REALTIME "no realtime" +#define LEGACY_CONF_REALTIME_SCHEDULING "realtime scheduling" #define LEGACY_CONF_RECMASTER_CAPABILITY "recmaster capability" #define LEGACY_CONF_LMASTER_CAPABILITY "lmaster capability" #define LEGACY_CONF_START_AS_STOPPED "start as stopped" diff --git a/ctdb/tests/cunit/config_test_001.sh b/ctdb/tests/cunit/config_test_001.sh index a3ddaabc09b..27e88888270 100755 --- a/ctdb/tests/cunit/config_test_001.sh +++ b/ctdb/tests/cunit/config_test_001.sh @@ -43,7 +43,7 @@ ok < "$conffile" <