cluster: STABLE31 - qdiskd: Fix bad timer check

Lon Hohberger lon at fedoraproject.org
Wed Mar 16 15:13:45 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=a47bc261ef58cb056077c448c06a7c518dd4191d
Commit:        a47bc261ef58cb056077c448c06a7c518dd4191d
Parent:        0f5af364300d3ddb2de2428de2f169be917a3c15
Author:        Lon Hohberger <lhh at redhat.com>
AuthorDate:    Thu Mar 3 17:39:10 2011 -0500
Committer:     Lon Hohberger <lhh at redhat.com>
CommitterDate: Wed Mar 16 11:11:27 2011 -0400

qdiskd: Fix bad timer check

Resolves: rhbz#679274
Resolves: rhbz#688154

Signed-off-by: Lon Hohberger <lhh at redhat.com>
Tested-by: Masanari Iida <masanari_iida at hp.com>
---
 cman/qdisk/score.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cman/qdisk/score.c b/cman/qdisk/score.c
index 572464d..3ca531f 100644
--- a/cman/qdisk/score.c
+++ b/cman/qdisk/score.c
@@ -86,7 +86,8 @@ fork_heuristic(struct h_data *h, struct timespec *now)
 	}
 
 	if (now->tv_sec < h->nextrun.tv_sec ||
-	    now->tv_nsec < h->nextrun.tv_nsec)
+	    ((now->tv_sec == h->nextrun.tv_sec) &&
+	     (now->tv_nsec < h->nextrun.tv_nsec)))
 		return 0;
 
 	h->nextrun.tv_sec = now->tv_sec + h->interval;


More information about the cluster-commits mailing list