* [patch 5/9] dlm: timer can't be global
@ 2005-06-02 8:02 David Teigland
0 siblings, 0 replies; only message in thread
From: David Teigland @ 2005-06-02 8:02 UTC (permalink / raw)
To: akpm, linux-kernel
[-- Attachment #1: global-recovery-timer.patch --]
[-- Type: text/plain, Size: 1981 bytes --]
The dlm_recoverd thread for each lockspace uses a recovery timer, so that
timer must be per-lockspace, not global.
Signed-off-by: David Teigland <teigland@redhat.com>
Index: linux/drivers/dlm/dlm_internal.h
===================================================================
--- linux.orig/drivers/dlm/dlm_internal.h 2005-06-02 12:28:30.000000000 +0800
+++ linux/drivers/dlm/dlm_internal.h 2005-06-02 13:04:51.696074128 +0800
@@ -477,6 +477,7 @@
/* recovery related */
+ struct timer_list ls_timer;
wait_queue_head_t ls_wait_member;
struct task_struct *ls_recoverd_task;
struct semaphore ls_recoverd_active;
Index: linux/drivers/dlm/recover.c
===================================================================
--- linux.orig/drivers/dlm/recover.c 2005-06-02 12:28:30.000000000 +0800
+++ linux/drivers/dlm/recover.c 2005-06-02 13:04:00.372876440 +0800
@@ -22,8 +22,6 @@
#include "lowcomms.h"
#include "member.h"
-static struct timer_list dlm_timer;
-
/*
* Recovery waiting routines: these functions wait for a particular reply from
@@ -50,7 +48,7 @@
static void dlm_wait_timer_fn(unsigned long data)
{
struct dlm_ls *ls = (struct dlm_ls *) data;
- mod_timer(&dlm_timer, jiffies + (dlm_config.recover_timer * HZ));
+ mod_timer(&ls->ls_timer, jiffies + (dlm_config.recover_timer * HZ));
wake_up(&ls->ls_wait_general);
}
@@ -58,14 +56,14 @@
{
int error = 0;
- init_timer(&dlm_timer);
- dlm_timer.function = dlm_wait_timer_fn;
- dlm_timer.data = (long) ls;
- dlm_timer.expires = jiffies + (dlm_config.recover_timer * HZ);
- add_timer(&dlm_timer);
+ init_timer(&ls->ls_timer);
+ ls->ls_timer.function = dlm_wait_timer_fn;
+ ls->ls_timer.data = (long) ls;
+ ls->ls_timer.expires = jiffies + (dlm_config.recover_timer * HZ);
+ add_timer(&ls->ls_timer);
wait_event(ls->ls_wait_general, testfn(ls) || dlm_recovery_stopped(ls));
- del_timer_sync(&dlm_timer);
+ del_timer_sync(&ls->ls_timer);
if (dlm_recovery_stopped(ls))
error = -EINTR;
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-02 8:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-02 8:02 [patch 5/9] dlm: timer can't be global David Teigland
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.