aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-08-08 18:06:07 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-08-09 09:45:31 -0400
commitf6db1b8e724b071d144055b48da3827ce26dba1c (patch)
tree7812eb7ff88dbf638cc8bfd30d3e86aa1d35f0e1 /fs/dlm
parent5ff519112af6a6dab0ad7f6b0b0a2dcfff273e5b (diff)
[DLM] abort recovery more quickly
When we abort one recovery to do another, break out of the ping_members() routine more quickly, and wake up the dlm_recoverd thread more quickly instead of waiting for it to time out. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/member.c24
-rw-r--r--fs/dlm/recoverd.c1
2 files changed, 20 insertions, 5 deletions
diff --git a/fs/dlm/member.c b/fs/dlm/member.c
index cd0c51e724e0..ebb33c30f0f3 100644
--- a/fs/dlm/member.c
+++ b/fs/dlm/member.c
@@ -162,11 +162,22 @@ static void make_member_array(struct dlm_ls *ls)
162 162
163/* send a status request to all members just to establish comms connections */ 163/* send a status request to all members just to establish comms connections */
164 164
165static void ping_members(struct dlm_ls *ls) 165static int ping_members(struct dlm_ls *ls)
166{ 166{
167 struct dlm_member *memb; 167 struct dlm_member *memb;
168 list_for_each_entry(memb, &ls->ls_nodes, list) 168 int error = 0;
169 dlm_rcom_status(ls, memb->nodeid); 169
170 list_for_each_entry(memb, &ls->ls_nodes, list) {
171 error = dlm_recovery_stopped(ls);
172 if (error)
173 break;
174 error = dlm_rcom_status(ls, memb->nodeid);
175 if (error)
176 break;
177 }
178 if (error)
179 log_debug(ls, "ping_members aborted %d", error);
180 return error;
170} 181}
171 182
172int dlm_recover_members(struct dlm_ls *ls, struct dlm_recover *rv, int *neg_out) 183int dlm_recover_members(struct dlm_ls *ls, struct dlm_recover *rv, int *neg_out)
@@ -212,10 +223,13 @@ int dlm_recover_members(struct dlm_ls *ls, struct dlm_recover *rv, int *neg_out)
212 dlm_set_recover_status(ls, DLM_RS_NODES); 223 dlm_set_recover_status(ls, DLM_RS_NODES);
213 *neg_out = neg; 224 *neg_out = neg;
214 225
215 ping_members(ls); 226 error = ping_members(ls);
227 if (error)
228 goto out;
216 229
217 error = dlm_recover_members_wait(ls); 230 error = dlm_recover_members_wait(ls);
218 log_debug(ls, "total members %d", ls->ls_num_nodes); 231 out:
232 log_debug(ls, "total members %d error %d", ls->ls_num_nodes, error);
219 return error; 233 return error;
220} 234}
221 235
diff --git a/fs/dlm/recoverd.c b/fs/dlm/recoverd.c
index 70103533677d..eac8e9fa67f1 100644
--- a/fs/dlm/recoverd.c
+++ b/fs/dlm/recoverd.c
@@ -275,6 +275,7 @@ void dlm_recoverd_stop(struct dlm_ls *ls)
275 275
276void dlm_recoverd_suspend(struct dlm_ls *ls) 276void dlm_recoverd_suspend(struct dlm_ls *ls)
277{ 277{
278 wake_up(&ls->ls_wait_general);
278 mutex_lock(&ls->ls_recoverd_active); 279 mutex_lock(&ls->ls_recoverd_active);
279} 280}
280 281