aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/recoverd.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2012-05-10 11:18:07 -0400
committerDavid Teigland <teigland@redhat.com>2012-07-16 15:16:19 -0400
commitc04fecb4d9f7753e0cbff7edd03ec68f8721cdce (patch)
treeecd82017d49c7bb03b96a8ad1eb4e9a5bb84409a /fs/dlm/recoverd.c
parentecc728467fb0c3e350b57fc66ed7585c15be50f5 (diff)
dlm: use rsbtbl as resource directory
Remove the dir hash table (dirtbl), and use the rsb hash table (rsbtbl) as the resource directory. It has always been an unnecessary duplication of information. This improves efficiency by using a single rsbtbl lookup in many cases where both rsbtbl and dirtbl lookups were needed previously. This eliminates the need to handle cases of rsbtbl and dirtbl being out of sync. In many cases there will be memory savings because the dir hash table no longer exists. Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/recoverd.c')
-rw-r--r--fs/dlm/recoverd.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/dlm/recoverd.c b/fs/dlm/recoverd.c
index f1a9073c0835..88ce65ff021e 100644
--- a/fs/dlm/recoverd.c
+++ b/fs/dlm/recoverd.c
@@ -60,12 +60,7 @@ static int ls_recover(struct dlm_ls *ls, struct dlm_recover *rv)
60 60
61 dlm_callback_suspend(ls); 61 dlm_callback_suspend(ls);
62 62
63 /* 63 dlm_clear_toss(ls);
64 * Free non-master tossed rsb's. Master rsb's are kept on toss
65 * list and put on root list to be included in resdir recovery.
66 */
67
68 dlm_clear_toss_list(ls);
69 64
70 /* 65 /*
71 * This list of root rsb's will be the basis of most of the recovery 66 * This list of root rsb's will be the basis of most of the recovery
@@ -84,6 +79,10 @@ static int ls_recover(struct dlm_ls *ls, struct dlm_recover *rv)
84 goto fail; 79 goto fail;
85 } 80 }
86 81
82 dlm_recover_dir_nodeid(ls);
83
84 ls->ls_recover_dir_sent_res = 0;
85 ls->ls_recover_dir_sent_msg = 0;
87 ls->ls_recover_locks_in = 0; 86 ls->ls_recover_locks_in = 0;
88 87
89 dlm_set_recover_status(ls, DLM_RS_NODES); 88 dlm_set_recover_status(ls, DLM_RS_NODES);
@@ -115,6 +114,9 @@ static int ls_recover(struct dlm_ls *ls, struct dlm_recover *rv)
115 goto fail; 114 goto fail;
116 } 115 }
117 116
117 log_debug(ls, "dlm_recover_directory %u out %u messages",
118 ls->ls_recover_dir_sent_res, ls->ls_recover_dir_sent_msg);
119
118 /* 120 /*
119 * We may have outstanding operations that are waiting for a reply from 121 * We may have outstanding operations that are waiting for a reply from
120 * a failed node. Mark these to be resent after recovery. Unlock and 122 * a failed node. Mark these to be resent after recovery. Unlock and