aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/dlm_internal.h
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2012-05-15 17:07:49 -0400
committerDavid Teigland <teigland@redhat.com>2012-07-16 15:17:52 -0400
commit1d7c484eeb167fc374294e38ae402de4097c8611 (patch)
tree82ed8a279b8f399205a15951c50c22aea67d7323 /fs/dlm/dlm_internal.h
parentc04fecb4d9f7753e0cbff7edd03ec68f8721cdce (diff)
dlm: use idr instead of list for recovered rsbs
When a large number of resources are being recovered, a linear search of the recover_list takes a long time. Use an idr in place of a list. Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r--fs/dlm/dlm_internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index 3093207a7684..a5f82d5b3946 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -288,6 +288,7 @@ struct dlm_rsb {
288 int res_nodeid; 288 int res_nodeid;
289 int res_master_nodeid; 289 int res_master_nodeid;
290 int res_dir_nodeid; 290 int res_dir_nodeid;
291 int res_id; /* for ls_recover_idr */
291 uint32_t res_lvbseq; 292 uint32_t res_lvbseq;
292 uint32_t res_hash; 293 uint32_t res_hash;
293 uint32_t res_bucket; /* rsbtbl */ 294 uint32_t res_bucket; /* rsbtbl */
@@ -587,6 +588,8 @@ struct dlm_ls {
587 struct list_head ls_recover_list; 588 struct list_head ls_recover_list;
588 spinlock_t ls_recover_list_lock; 589 spinlock_t ls_recover_list_lock;
589 int ls_recover_list_count; 590 int ls_recover_list_count;
591 struct idr ls_recover_idr;
592 spinlock_t ls_recover_idr_lock;
590 wait_queue_head_t ls_wait_general; 593 wait_queue_head_t ls_wait_general;
591 struct mutex ls_clear_proc_locks; 594 struct mutex ls_clear_proc_locks;
592 595