summaryrefslogtreecommitdiffstats
path: root/fs/dlm/dlm_internal.h
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2012-05-15 16:07:49 -0500
committerDavid Teigland <teigland@redhat.com>2012-07-16 14:17:52 -0500
commit1d7c484eeb167fc374294e38ae402de4097c8611 (patch)
tree82ed8a279b8f399205a15951c50c22aea67d7323 /fs/dlm/dlm_internal.h
parentc04fecb4d9f7753e0cbff7edd03ec68f8721cdce (diff)
downloadlinux-1d7c484eeb167fc374294e38ae402de4097c8611.tar.gz
linux-1d7c484eeb167fc374294e38ae402de4097c8611.tar.bz2
linux-1d7c484eeb167fc374294e38ae402de4097c8611.zip
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 {
int res_nodeid;
int res_master_nodeid;
int res_dir_nodeid;
+ int res_id; /* for ls_recover_idr */
uint32_t res_lvbseq;
uint32_t res_hash;
uint32_t res_bucket; /* rsbtbl */
@@ -587,6 +588,8 @@ struct dlm_ls {
struct list_head ls_recover_list;
spinlock_t ls_recover_list_lock;
int ls_recover_list_count;
+ struct idr ls_recover_idr;
+ spinlock_t ls_recover_idr_lock;
wait_queue_head_t ls_wait_general;
struct mutex ls_clear_proc_locks;