diff options
author | David Teigland <teigland@redhat.com> | 2006-08-08 17:06:07 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-08-09 09:45:31 -0400 |
commit | f6db1b8e724b071d144055b48da3827ce26dba1c (patch) | |
tree | 7812eb7ff88dbf638cc8bfd30d3e86aa1d35f0e1 /fs/dlm/member.c | |
parent | 5ff519112af6a6dab0ad7f6b0b0a2dcfff273e5b (diff) | |
download | op-kernel-dev-f6db1b8e724b071d144055b48da3827ce26dba1c.zip op-kernel-dev-f6db1b8e724b071d144055b48da3827ce26dba1c.tar.gz |
[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/member.c')
-rw-r--r-- | fs/dlm/member.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/fs/dlm/member.c b/fs/dlm/member.c index cd0c51e..ebb33c3 100644 --- a/fs/dlm/member.c +++ b/fs/dlm/member.c @@ -162,11 +162,22 @@ static void make_member_array(struct dlm_ls *ls) /* send a status request to all members just to establish comms connections */ -static void ping_members(struct dlm_ls *ls) +static int ping_members(struct dlm_ls *ls) { struct dlm_member *memb; - list_for_each_entry(memb, &ls->ls_nodes, list) - dlm_rcom_status(ls, memb->nodeid); + int error = 0; + + list_for_each_entry(memb, &ls->ls_nodes, list) { + error = dlm_recovery_stopped(ls); + if (error) + break; + error = dlm_rcom_status(ls, memb->nodeid); + if (error) + break; + } + if (error) + log_debug(ls, "ping_members aborted %d", error); + return error; } int 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) dlm_set_recover_status(ls, DLM_RS_NODES); *neg_out = neg; - ping_members(ls); + error = ping_members(ls); + if (error) + goto out; error = dlm_recover_members_wait(ls); - log_debug(ls, "total members %d", ls->ls_num_nodes); + out: + log_debug(ls, "total members %d error %d", ls->ls_num_nodes, error); return error; } |