Skip to content

Commit

Permalink
fs: dlm: update comments about recovery and membership handling
Browse files Browse the repository at this point in the history
Make clear that a particular recovery iteration must not be aborted
before membership changes are applied to the members list (ls_nodes)
and midcomms layer.  Interrupting recovery before this can result
in missing node-specific changes in midcomms or through lsops.

Signed-off-by: Alexander Aring <[email protected]>
Signed-off-by: David Teigland <[email protected]>
  • Loading branch information
Alexander Aring authored and teigland committed Jun 24, 2022
1 parent 5d92a30 commit ca8031d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/dlm/member.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,11 @@ int dlm_recover_members(struct dlm_ls *ls, struct dlm_recover *rv, int *neg_out)
int i, error, 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 */
* count as a negative change so the "neg" recovery steps will happen
*
* This functionality must report all member changes to lsops or
* midcomms layer and must never return before.
*/

list_for_each_entry(memb, &ls->ls_nodes_gone, list) {
log_rinfo(ls, "prev removed member %d", memb->nodeid);
Expand Down
4 changes: 4 additions & 0 deletions fs/dlm/recoverd.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ static int ls_recover(struct dlm_ls *ls, struct dlm_recover *rv)

/*
* Add or remove nodes from the lockspace's ls_nodes list.
*
* Due to the fact that we must report all membership changes to lsops
* or midcomms layer, it is not permitted to abort ls_recover() until
* this is done.
*/

error = dlm_recover_members(ls, rv, &neg);
Expand Down

0 comments on commit ca8031d

Please sign in to comment.