----- Original Message -----
| Slot numbers are assigned to nodes when they join the lockspace.
| The slot number chosen is the minimum unused value starting at 1.
| Once a node is assigned a slot, that slot number will not change
| while the node remains a lockspace member.  If the node leaves
| and rejoins it can be assigned a new slot number.
| 
| A new generation number is also added to a lockspace.  It is
| set and incremented during each recovery along with the slot
| collection/assignment.
| 
| The slot numbers will be passed to gfs2 which will use them as
| journal id's.
| 
| Signed-off-by: David Teigland <[email protected]>
| ---
|  fs/dlm/dlm_internal.h |   48 ++++++++-
|  fs/dlm/lockspace.c    |    5 +
|  fs/dlm/member.c       |  274
|  ++++++++++++++++++++++++++++++++++++++++++++++++-
|  fs/dlm/member.h       |    7 ++
|  fs/dlm/rcom.c         |   99 +++++++++++++++---
|  fs/dlm/rcom.h         |    2 +-
|  fs/dlm/recover.c      |   64 ++++++++++--
|  7 files changed, 470 insertions(+), 29 deletions(-)
(snip)
| +int dlm_slots_assign(struct dlm_ls *ls, int *num_slots, int
(snip)
| +                     memb->slot = i+1;

Nit, but this should have some spaces, iow, "i + 1;"

| @@ -161,8 +180,11 @@ int dlm_rcom_status(struct dlm_ls *ls, int
| nodeid)
|               /* we pretend the remote lockspace exists with 0 status */
|               log_debug(ls, "remote node %d not ready", nodeid);
|               rc->rc_result = 0;
| -     } else
| -             error = check_config(ls, rc, nodeid);
| +             goto out;
| +     }
| +
| +     error = check_rcom_config(ls, rc, nodeid);
| +
|       /* the caller looks at rc_result for the remote recovery status */
|   out:
|       return error;

IMHO, this is messy and I don't see the point, other than to change the
function name. Maybe I'm not following it, but adding the goto only
seems to unnecessarily complicate things. My source is a bit outdated, but
it looks to me like you can accomplish the same thing with:

                /* we pretend the remote lockspace exists with 0 status */
                log_debug(ls, "remote node %d not ready", nodeid);
                rc->rc_result = 0;
        } else
 -              error = check_config(ls, rc, nodeid);
 +              error = check_rcom_config(ls, rc, nodeid);
 +
        /* the caller looks at rc_result for the remote recovery status */
   out:
        return error;

Other than that, ACK.

Regards,

Bob Peterson
Red Hat File Systems

Reply via email to