fs: dlm: update comments about recovery and membership handling
authorAlexander Aring <aahringo@redhat.com>
Wed, 22 Jun 2022 18:45:13 +0000 (14:45 -0400)
committerDavid Teigland <teigland@redhat.com>
Fri, 24 Jun 2022 16:57:40 +0000 (11:57 -0500)
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 <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/member.c
fs/dlm/recoverd.c

index 98084e0..7e5f5ae 100644 (file)
@@ -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);
index a55dfce..2d46e65 100644 (file)
@@ -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);