From: Pete Zaitcev <zaitcev@redhat.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: [Patch 1/1] CLD: regression in unified cld_timer
Date: Tue, 9 Feb 2010 10:02:10 -0700 [thread overview]
Message-ID: <20100209100210.2ba1dda5@redhat.com> (raw)
The common timer implementation had a bug whereas it overwrote the list
of timers when a timer callback added its own timer -- which just about
every one of them does. The most visible result was that sessions stopped
expiring correctly and left dangling file locks. Also, every new session
failed after 2 minutes 35 seconds.
The fix is not to keep a local copy of the list head across invocations
of the callback.
Signed-Off-By: Pete Zaitcev <zaitcev@redhat.com>
---
lib/libtimer.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Jeff & Colin: sorry to waste your time with inferences that the change
to XDR was somehow involved. I guess I did not update the CLD on the
server since before the common timer.
diff --git a/lib/libtimer.c b/lib/libtimer.c
index 9fcab4f..c6f5241 100644
--- a/lib/libtimer.c
+++ b/lib/libtimer.c
@@ -84,6 +84,7 @@ time_t cld_timers_run(struct cld_timer_list *tlist)
timer->on_list = false;
}
+ tlist->list = timer_list;
tmp = exec_list;
while (tmp) {
@@ -94,7 +95,8 @@ time_t cld_timers_run(struct cld_timer_list *tlist)
timer->cb(timer);
}
- if (timer_list) {
+ if (tlist->list) {
+ timer_list = tlist->list;
timer = timer_list->data;
if (timer->expires > now)
next_timeout = (timer->expires - now);
@@ -102,7 +104,6 @@ time_t cld_timers_run(struct cld_timer_list *tlist)
next_timeout = 1;
}
- tlist->list = timer_list;
return next_timeout;
}
next reply other threads:[~2010-02-09 17:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-09 17:02 Pete Zaitcev [this message]
2010-02-09 22:51 ` [Patch 1/1] CLD: regression in unified cld_timer Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100209100210.2ba1dda5@redhat.com \
--to=zaitcev@redhat.com \
--cc=hail-devel@vger.kernel.org \
--cc=jeff@garzik.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox