Fix scheduler pause-detection timeout patch

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
This commit is contained in:
Jan Friesse 2013-08-19 11:04:03 +02:00
parent 5995710316
commit a8e1235b86
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From 2740cfd1eac60714601c74df2137fe588b607866 Mon Sep 17 00:00:00 2001
From: Michael Chapman <mike@very.puzzling.org>
Date: Mon, 19 Aug 2013 01:30:15 +0000
Subject: [PATCH] Fix scheduler pause-detection timeout
qb_loop_timer_add expects the timeout to be in nanoseconds, but we were
passing the value in milliseconds. Scale the timeout appropriately.
Signed-off-by: Michael Chapman <mike@very.puzzling.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
---
exec/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/exec/main.c b/exec/main.c
index 65b28c2..6c69ee5 100644
--- a/exec/main.c
+++ b/exec/main.c
@@ -824,7 +824,7 @@ static void timer_function_scheduler_timeout (void *data)
timeout_data->max_tv_diff = timeout_data->totem_config->token_timeout * QB_TIME_NS_IN_MSEC * 0.8;
qb_loop_timer_add (corosync_poll_handle,
QB_LOOP_MED,
- timeout_data->totem_config->token_timeout / 3,
+ timeout_data->totem_config->token_timeout * QB_TIME_NS_IN_MSEC / 3,
timeout_data,
timer_function_scheduler_timeout,
&timeout_data->handle);
--
1.7.1

View File

@ -21,12 +21,14 @@
Name: corosync
Summary: The Corosync Cluster Engine and Application Programming Interfaces
Version: 2.3.1
Release: 2%{?gitver}%{?dist}
Release: 3%{?gitver}%{?dist}
License: BSD
Group: System Environment/Base
URL: http://www.corosync.org/
Source0: http://corosync.org/download/%{name}-%{version}%{?gittarver}.tar.gz
Patch0: bz998362-1-Fix-scheduler-pause-detection-timeout.patch
%if 0%{?rhel}
ExclusiveArch: i686 x86_64
%endif
@ -73,6 +75,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%prep
%setup -q -n %{name}-%{version}%{?gittarver}
%patch0 -p1 -b .bz998362-1
%build
%if %{with runautogen}
@ -331,6 +334,12 @@ The Corosync Cluster Engine APIs.
%{_mandir}/man8/quorum_overview.8*
%changelog
* Mon Aug 19 2013 Jan Friesse <jfriesse@redhat.com> 2.3.1-3
- Resolves: rhbz#998362
- Fix scheduler pause-detection timeout (rhbz#998362)
- merge upstream commit 2740cfd1eac60714601c74df2137fe588b607866 (rhbz#998362)
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild