aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/dlm_internal.h
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2011-07-07 15:05:03 -0400
committerDavid Teigland <teigland@redhat.com>2011-07-12 17:02:09 -0400
commit3881ac04ebf94268ba3d6e486aa524fd41f893a9 (patch)
tree2ddb5c099f60f541d7e50f669f84fd58c3920bec /fs/dlm/dlm_internal.h
parent3d6aa675fff9eee5a6339d67b355b63a6d69565f (diff)
dlm: improve rsb searches
By pre-allocating rsb structs before searching the hash table, they can be inserted immediately. This avoids always having to repeat the search when adding the struct to hash list. This also adds space to the rsb struct for a max resource name, so an rsb allocation can be used by any request. The constant size also allows us to finally use a slab for the rsb structs. Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r--fs/dlm/dlm_internal.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index 23a234bddc60..6614f335e25d 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -293,7 +293,7 @@ struct dlm_rsb {
293 int res_recover_locks_count; 293 int res_recover_locks_count;
294 294
295 char *res_lvbptr; 295 char *res_lvbptr;
296 char res_name[1]; 296 char res_name[DLM_RESNAME_MAXLEN+1];
297}; 297};
298 298
299/* find_rsb() flags */ 299/* find_rsb() flags */
@@ -477,6 +477,10 @@ struct dlm_ls {
477 struct mutex ls_timeout_mutex; 477 struct mutex ls_timeout_mutex;
478 struct list_head ls_timeout; 478 struct list_head ls_timeout;
479 479
480 spinlock_t ls_new_rsb_spin;
481 int ls_new_rsb_count;
482 struct list_head ls_new_rsb; /* new rsb structs */
483
480 struct list_head ls_nodes; /* current nodes in ls */ 484 struct list_head ls_nodes; /* current nodes in ls */
481 struct list_head ls_nodes_gone; /* dead node list, recovery */ 485 struct list_head ls_nodes_gone; /* dead node list, recovery */
482 int ls_num_nodes; /* number of nodes in ls */ 486 int ls_num_nodes; /* number of nodes in ls */