Skip to content

Commit

Permalink
[DLM] fix aborted recovery during node removal
Browse files Browse the repository at this point in the history
Red Hat BZ 211914

With the new cluster infrastructure, dlm recovery for a node removal can
be aborted and restarted for a node addition.  When this happens, the
restarted recovery isn't aware that it's doing recovery for the earlier
removal as well as the addition.  So, it then skips the recovery steps
only required when nodes are removed.  This can result in locks not being
purged for failed/removed nodes.  The fix is to check for removed nodes
for which recovery has not been completed at the start of a new recovery
sequence.

Signed-off-by: David Teigland <[email protected]>
Signed-off-by: Steven Whitehouse <[email protected]>
  • Loading branch information
teigland authored and swhiteho committed Nov 30, 2006
1 parent d440015 commit 91c0dc9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fs/dlm/member.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ int dlm_recover_members(struct dlm_ls *ls, struct dlm_recover *rv, int *neg_out)
struct dlm_member *memb, *safe;
int i, error, found, pos = 0, neg = 0, low = -1;

/* previously removed members that we've not finished removing need to
count as a negative change so the "neg" recovery steps will happen */

list_for_each_entry(memb, &ls->ls_nodes_gone, list) {
log_debug(ls, "prev removed member %d", memb->nodeid);
neg++;
}

/* move departed members from ls_nodes to ls_nodes_gone */

list_for_each_entry_safe(memb, safe, &ls->ls_nodes, list) {
Expand Down
7 changes: 7 additions & 0 deletions fs/dlm/recoverd.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ static int ls_recover(struct dlm_ls *ls, struct dlm_recover *rv)
*/

dlm_recover_rsbs(ls);
} else {
/*
* Other lockspace members may be going through the "neg" steps
* while also adding us to the lockspace, in which case they'll
* be looking for this status bit during dlm_recover_locks().
*/
dlm_set_recover_status(ls, DLM_RS_LOCKS);
}

dlm_release_root_list(ls);
Expand Down

0 comments on commit 91c0dc9

Please sign in to comment.