From 5b580e5d65ac5dce9dc07aba4fe1f31226a66ed8 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 10 Jun 2014 16:44:59 +1000 Subject: [PATCH] ctdb-common: Changing scheduler policy does not require ctdb context Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/common/ctdb_fork.c | 2 +- ctdb/common/ctdb_util.c | 4 ++-- ctdb/include/ctdb_private.h | 4 ++-- ctdb/server/ctdb_daemon.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ctdb/common/ctdb_fork.c b/ctdb/common/ctdb_fork.c index 1d7d9aa278d..1343fd72617 100644 --- a/ctdb/common/ctdb_fork.c +++ b/ctdb/common/ctdb_fork.c @@ -92,7 +92,7 @@ pid_t ctdb_fork_no_free_ringbuffer(struct ctdb_context *ctdb) /* The child does not need to be realtime */ if (ctdb->do_setsched) { - ctdb_restore_scheduler(ctdb); + ctdb_restore_scheduler(); } ctdb->can_send_controls = false; diff --git a/ctdb/common/ctdb_util.c b/ctdb/common/ctdb_util.c index 4fe411fa390..b2f0ee72af0 100644 --- a/ctdb/common/ctdb_util.c +++ b/ctdb/common/ctdb_util.c @@ -329,7 +329,7 @@ struct ctdb_rec_data *ctdb_marshall_loop_next(struct ctdb_marshall_buffer *m, st /* if possible, make this task real time */ -void ctdb_set_scheduler(struct ctdb_context *ctdb) +void ctdb_set_scheduler(void) { #ifdef _AIX_ #if HAVE_THREAD_SETSCHED @@ -368,7 +368,7 @@ void ctdb_set_scheduler(struct ctdb_context *ctdb) /* restore previous scheduler parameters */ -void ctdb_restore_scheduler(struct ctdb_context *ctdb) +void ctdb_restore_scheduler(void) { #ifdef _AIX_ #if HAVE_THREAD_SETSCHED diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 8ebd1c55d9a..4d80415233b 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -1087,8 +1087,8 @@ void ctdb_call_resend_all(struct ctdb_context *ctdb); void ctdb_node_dead(struct ctdb_node *node); void ctdb_node_connected(struct ctdb_node *node); bool ctdb_blocking_freeze(struct ctdb_context *ctdb); -void ctdb_set_scheduler(struct ctdb_context *ctdb); -void ctdb_restore_scheduler(struct ctdb_context *ctdb); +void ctdb_set_scheduler(void); +void ctdb_restore_scheduler(void); struct tevent_signal *ctdb_init_sigchld(struct ctdb_context *ctdb); void ctdb_track_child(struct ctdb_context *ctdb, pid_t pid); diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index a83a855ec7d..2f0aa4a0911 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -1185,7 +1185,7 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog) if (ctdb->do_setsched) { /* try to set us up as realtime */ - ctdb_set_scheduler(ctdb); + ctdb_set_scheduler(); } /* ensure the socket is deleted on exit of the daemon */ -- 2.11.4.GIT