commit ctdb for openSUSE:Factory
Hello community, here is the log from the commit of package ctdb for openSUSE:Factory checked in at Thu Jan 14 16:07:23 CET 2010. -------- --- ctdb/ctdb.changes 2009-11-19 14:10:39.000000000 +0100 +++ /mounts/work_src_done/STABLE/ctdb/ctdb.changes 2009-12-17 22:35:08.000000000 +0100 @@ -1,0 +2,11 @@ +Thu Dec 17 22:34:34 CET 2009 - jengelh@medozas.de + +- Enable parallel building + +------------------------------------------------------------------- +Wed Dec 9 18:53:22 CET 2009 - jmcdonough@suse.de + +- Save and restore scheduling policy to prevent fatal error + with nonzero priority; (bnc#552845). + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- save-sched-policy.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ctdb.spec ++++++ --- /var/tmp/diff_new_pack.tanegc/_old 2010-01-14 16:05:17.000000000 +0100 +++ /var/tmp/diff_new_pack.tanegc/_new 2010-01-14 16:05:17.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package ctdb (Version 1.0.105) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,7 +20,7 @@ Name: ctdb Version: 1.0.105 -Release: 1 +Release: 2 License: GNU GPL version 3 Group: System Environment/Daemons Url: http://ctdb.samba.org/ @@ -28,6 +28,7 @@ Source1: ctdb-sysconfig-suse.template Patch0: ctdb-lib64.patch Patch1: ctdb-socket-path.patch +Patch2: save-sched-policy.patch %if 0%{?suse_version} PreReq: insserv %{?fillup_prereq} %else @@ -55,6 +56,7 @@ %setup -q %patch0 %patch1 -p1 +%patch2 -p1 %build %{?suse_update_config:%{suse_update_config -f}} @@ -70,7 +72,7 @@ --sysconfdir=%{_sysconfdir} \ --mandir=%{_mandir} \ --localstatedir="/var" -%{__make} docdir=%{_docdir} +%{__make} %{?jobs:-j%jobs} docdir=%{_docdir} %install mkdir -p \ ++++++ save-sched-policy.patch ++++++
From ff022af639e5378403222c95b71447c96988e0c4 Mon Sep 17 00:00:00 2001 From: Jim McDonough
Date: Wed, 9 Dec 2009 12:01:04 -0500 Subject: [PATCH] Save and restore scheduling policy.
Without this, if started with a non-zero priority, on the restore, it will fail, because SCHED_OTHER only allows a priority of zero. --- common/ctdb_util.c | 19 ++++++++++++++++--- include/ctdb_private.h | 1 + 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/common/ctdb_util.c b/common/ctdb_util.c index 3af1346..2204130 100644 --- a/common/ctdb_util.c +++ b/common/ctdb_util.c @@ -333,12 +333,21 @@ struct ctdb_rec_data *ctdb_marshall_loop_next(struct ctdb_marshall_buffer *m, st */ void ctdb_set_scheduler(struct ctdb_context *ctdb) { -#if HAVE_SCHED_SETSCHEDULER +#if HAVE_SCHED_SETSCHEDULER struct sched_param p; + + /* save off the policy */ + ctdb->saved_scheduler_policy = sched_getscheduler(0); + if (ctdb->saved_scheduler_policy == -1) { + DEBUG(DEBUG_CRIT,("Unable to get scheduler policy (%s)\n", + strerror(errno))); + return; + } + if (ctdb->saved_scheduler_param == NULL) { ctdb->saved_scheduler_param = talloc_size(ctdb, sizeof(p)); } - + if (sched_getparam(0, (struct sched_param *)ctdb->saved_scheduler_param) == -1) { DEBUG(DEBUG_ERR,("Unable to get old scheduler params\n")); return; @@ -362,10 +371,14 @@ void ctdb_set_scheduler(struct ctdb_context *ctdb) void ctdb_restore_scheduler(struct ctdb_context *ctdb) { #if HAVE_SCHED_SETSCHEDULER + if (ctdb->saved_scheduler_policy == -1) { + ctdb_fatal(ctdb, "No saved scheduler policy\n"); + } if (ctdb->saved_scheduler_param == NULL) { ctdb_fatal(ctdb, "No saved scheduler parameters\n"); } - if (sched_setscheduler(0, SCHED_OTHER, (struct sched_param *)ctdb->saved_scheduler_param) == -1) { + if (sched_setscheduler(0, ctdb->saved_scheduler_policy, + (struct sched_param *)ctdb->saved_scheduler_param) == -1) { ctdb_fatal(ctdb, "Unable to restore old scheduler parameters\n"); } #endif diff --git a/include/ctdb_private.h b/include/ctdb_private.h index f937ef4..4c9b0cf 100644 --- a/include/ctdb_private.h +++ b/include/ctdb_private.h @@ -433,6 +433,7 @@ struct ctdb_context { struct ctdb_client_ip *client_ip_list; bool do_setsched; bool do_checkpublicip; + int saved_scheduler_policy; void *saved_scheduler_param; struct _trbt_tree_t *server_ids; const char *event_script_dir; -- 1.6.4.2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de