From 757a42719635495779462514458bbfbf12a37dac Mon Sep 17 00:00:00 2001 From: David Teigland Date: Thu, 20 Oct 2011 13:26:28 -0500 Subject: dlm: add node slots and generation 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 --- fs/dlm/lockspace.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fs/dlm/lockspace.c') diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index 1d16a23b0a06..1441f04bfabe 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c @@ -525,6 +525,11 @@ static int new_lockspace(const char *name, int namelen, void **lockspace, if (!ls->ls_recover_buf) goto out_dirfree; + ls->ls_slot = 0; + ls->ls_num_slots = 0; + ls->ls_slots_size = 0; + ls->ls_slots = NULL; + INIT_LIST_HEAD(&ls->ls_recover_list); spin_lock_init(&ls->ls_recover_list_lock); ls->ls_recover_list_count = 0; -- cgit