summaryrefslogtreecommitdiffstats
path: root/fs/dlm/config.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2011-07-06 18:00:54 -0400
committerDavid Teigland <teigland@redhat.com>2011-07-11 09:43:45 -0400
commit3d6aa675fff9eee5a6339d67b355b63a6d69565f (patch)
treef401792f4e92f2473d361bfb185c517838ab2032 /fs/dlm/config.c
parenta22ca4806822154c163c6f220f4c2a05adf96fc7 (diff)
dlm: keep lkbs in idr
This is simpler and quicker than the hash table, and avoids needing to search the hash list for every new lkid to check if it's used. Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/config.c')
-rw-r--r--fs/dlm/config.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/dlm/config.c b/fs/dlm/config.c
index ad3b5a8535d0..4e20f9317156 100644
--- a/fs/dlm/config.c
+++ b/fs/dlm/config.c
@@ -94,7 +94,6 @@ struct dlm_cluster {
94 unsigned int cl_tcp_port; 94 unsigned int cl_tcp_port;
95 unsigned int cl_buffer_size; 95 unsigned int cl_buffer_size;
96 unsigned int cl_rsbtbl_size; 96 unsigned int cl_rsbtbl_size;
97 unsigned int cl_lkbtbl_size;
98 unsigned int cl_dirtbl_size; 97 unsigned int cl_dirtbl_size;
99 unsigned int cl_recover_timer; 98 unsigned int cl_recover_timer;
100 unsigned int cl_toss_secs; 99 unsigned int cl_toss_secs;
@@ -109,7 +108,6 @@ enum {
109 CLUSTER_ATTR_TCP_PORT = 0, 108 CLUSTER_ATTR_TCP_PORT = 0,
110 CLUSTER_ATTR_BUFFER_SIZE, 109 CLUSTER_ATTR_BUFFER_SIZE,
111 CLUSTER_ATTR_RSBTBL_SIZE, 110 CLUSTER_ATTR_RSBTBL_SIZE,
112 CLUSTER_ATTR_LKBTBL_SIZE,
113 CLUSTER_ATTR_DIRTBL_SIZE, 111 CLUSTER_ATTR_DIRTBL_SIZE,
114 CLUSTER_ATTR_RECOVER_TIMER, 112 CLUSTER_ATTR_RECOVER_TIMER,
115 CLUSTER_ATTR_TOSS_SECS, 113 CLUSTER_ATTR_TOSS_SECS,
@@ -162,7 +160,6 @@ __CONFIGFS_ATTR(name, 0644, name##_read, name##_write)
162CLUSTER_ATTR(tcp_port, 1); 160CLUSTER_ATTR(tcp_port, 1);
163CLUSTER_ATTR(buffer_size, 1); 161CLUSTER_ATTR(buffer_size, 1);
164CLUSTER_ATTR(rsbtbl_size, 1); 162CLUSTER_ATTR(rsbtbl_size, 1);
165CLUSTER_ATTR(lkbtbl_size, 1);
166CLUSTER_ATTR(dirtbl_size, 1); 163CLUSTER_ATTR(dirtbl_size, 1);
167CLUSTER_ATTR(recover_timer, 1); 164CLUSTER_ATTR(recover_timer, 1);
168CLUSTER_ATTR(toss_secs, 1); 165CLUSTER_ATTR(toss_secs, 1);
@@ -176,7 +173,6 @@ static struct configfs_attribute *cluster_attrs[] = {
176 [CLUSTER_ATTR_TCP_PORT] = &cluster_attr_tcp_port.attr, 173 [CLUSTER_ATTR_TCP_PORT] = &cluster_attr_tcp_port.attr,
177 [CLUSTER_ATTR_BUFFER_SIZE] = &cluster_attr_buffer_size.attr, 174 [CLUSTER_ATTR_BUFFER_SIZE] = &cluster_attr_buffer_size.attr,
178 [CLUSTER_ATTR_RSBTBL_SIZE] = &cluster_attr_rsbtbl_size.attr, 175 [CLUSTER_ATTR_RSBTBL_SIZE] = &cluster_attr_rsbtbl_size.attr,
179 [CLUSTER_ATTR_LKBTBL_SIZE] = &cluster_attr_lkbtbl_size.attr,
180 [CLUSTER_ATTR_DIRTBL_SIZE] = &cluster_attr_dirtbl_size.attr, 176 [CLUSTER_ATTR_DIRTBL_SIZE] = &cluster_attr_dirtbl_size.attr,
181 [CLUSTER_ATTR_RECOVER_TIMER] = &cluster_attr_recover_timer.attr, 177 [CLUSTER_ATTR_RECOVER_TIMER] = &cluster_attr_recover_timer.attr,
182 [CLUSTER_ATTR_TOSS_SECS] = &cluster_attr_toss_secs.attr, 178 [CLUSTER_ATTR_TOSS_SECS] = &cluster_attr_toss_secs.attr,
@@ -446,7 +442,6 @@ static struct config_group *make_cluster(struct config_group *g,
446 cl->cl_tcp_port = dlm_config.ci_tcp_port; 442 cl->cl_tcp_port = dlm_config.ci_tcp_port;
447 cl->cl_buffer_size = dlm_config.ci_buffer_size; 443 cl->cl_buffer_size = dlm_config.ci_buffer_size;
448 cl->cl_rsbtbl_size = dlm_config.ci_rsbtbl_size; 444 cl->cl_rsbtbl_size = dlm_config.ci_rsbtbl_size;
449 cl->cl_lkbtbl_size = dlm_config.ci_lkbtbl_size;
450 cl->cl_dirtbl_size = dlm_config.ci_dirtbl_size; 445 cl->cl_dirtbl_size = dlm_config.ci_dirtbl_size;
451 cl->cl_recover_timer = dlm_config.ci_recover_timer; 446 cl->cl_recover_timer = dlm_config.ci_recover_timer;
452 cl->cl_toss_secs = dlm_config.ci_toss_secs; 447 cl->cl_toss_secs = dlm_config.ci_toss_secs;
@@ -1038,7 +1033,6 @@ int dlm_our_addr(struct sockaddr_storage *addr, int num)
1038#define DEFAULT_TCP_PORT 21064 1033#define DEFAULT_TCP_PORT 21064
1039#define DEFAULT_BUFFER_SIZE 4096 1034#define DEFAULT_BUFFER_SIZE 4096
1040#define DEFAULT_RSBTBL_SIZE 1024 1035#define DEFAULT_RSBTBL_SIZE 1024
1041#define DEFAULT_LKBTBL_SIZE 1024
1042#define DEFAULT_DIRTBL_SIZE 1024 1036#define DEFAULT_DIRTBL_SIZE 1024
1043#define DEFAULT_RECOVER_TIMER 5 1037#define DEFAULT_RECOVER_TIMER 5
1044#define DEFAULT_TOSS_SECS 10 1038#define DEFAULT_TOSS_SECS 10
@@ -1052,7 +1046,6 @@ struct dlm_config_info dlm_config = {
1052 .ci_tcp_port = DEFAULT_TCP_PORT, 1046 .ci_tcp_port = DEFAULT_TCP_PORT,
1053 .ci_buffer_size = DEFAULT_BUFFER_SIZE, 1047 .ci_buffer_size = DEFAULT_BUFFER_SIZE,
1054 .ci_rsbtbl_size = DEFAULT_RSBTBL_SIZE, 1048 .ci_rsbtbl_size = DEFAULT_RSBTBL_SIZE,
1055 .ci_lkbtbl_size = DEFAULT_LKBTBL_SIZE,
1056 .ci_dirtbl_size = DEFAULT_DIRTBL_SIZE, 1049 .ci_dirtbl_size = DEFAULT_DIRTBL_SIZE,
1057 .ci_recover_timer = DEFAULT_RECOVER_TIMER, 1050 .ci_recover_timer = DEFAULT_RECOVER_TIMER,
1058 .ci_toss_secs = DEFAULT_TOSS_SECS, 1051 .ci_toss_secs = DEFAULT_TOSS_SECS,