config.c (5a84d159061d914c8dd4aa372ac6e9529c2be453) | config.c (6ed7257b46709e87d79ac2b6b819b7e0c9184998) |
---|---|
1/****************************************************************************** 2******************************************************************************* 3** 4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | 1/****************************************************************************** 2******************************************************************************* 3** 4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
5** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. | 5** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. |
6** 7** This copyrighted material is made available to anyone wishing to use, 8** modify, copy, or redistribute it subject to the terms and conditions 9** of the GNU General Public License v.2. 10** 11******************************************************************************* 12******************************************************************************/ 13 --- 70 unchanged lines hidden (view full) --- 84 unsigned int cl_buffer_size; 85 unsigned int cl_rsbtbl_size; 86 unsigned int cl_lkbtbl_size; 87 unsigned int cl_dirtbl_size; 88 unsigned int cl_recover_timer; 89 unsigned int cl_toss_secs; 90 unsigned int cl_scan_secs; 91 unsigned int cl_log_debug; | 6** 7** This copyrighted material is made available to anyone wishing to use, 8** modify, copy, or redistribute it subject to the terms and conditions 9** of the GNU General Public License v.2. 10** 11******************************************************************************* 12******************************************************************************/ 13 --- 70 unchanged lines hidden (view full) --- 84 unsigned int cl_buffer_size; 85 unsigned int cl_rsbtbl_size; 86 unsigned int cl_lkbtbl_size; 87 unsigned int cl_dirtbl_size; 88 unsigned int cl_recover_timer; 89 unsigned int cl_toss_secs; 90 unsigned int cl_scan_secs; 91 unsigned int cl_log_debug; |
92 unsigned int cl_protocol; |
|
92}; 93 94enum { 95 CLUSTER_ATTR_TCP_PORT = 0, 96 CLUSTER_ATTR_BUFFER_SIZE, 97 CLUSTER_ATTR_RSBTBL_SIZE, 98 CLUSTER_ATTR_LKBTBL_SIZE, 99 CLUSTER_ATTR_DIRTBL_SIZE, 100 CLUSTER_ATTR_RECOVER_TIMER, 101 CLUSTER_ATTR_TOSS_SECS, 102 CLUSTER_ATTR_SCAN_SECS, 103 CLUSTER_ATTR_LOG_DEBUG, | 93}; 94 95enum { 96 CLUSTER_ATTR_TCP_PORT = 0, 97 CLUSTER_ATTR_BUFFER_SIZE, 98 CLUSTER_ATTR_RSBTBL_SIZE, 99 CLUSTER_ATTR_LKBTBL_SIZE, 100 CLUSTER_ATTR_DIRTBL_SIZE, 101 CLUSTER_ATTR_RECOVER_TIMER, 102 CLUSTER_ATTR_TOSS_SECS, 103 CLUSTER_ATTR_SCAN_SECS, 104 CLUSTER_ATTR_LOG_DEBUG, |
105 CLUSTER_ATTR_PROTOCOL, |
|
104}; 105 106struct cluster_attribute { 107 struct configfs_attribute attr; 108 ssize_t (*show)(struct cluster *, char *); 109 ssize_t (*store)(struct cluster *, const char *, size_t); 110}; 111 --- 42 unchanged lines hidden (view full) --- 154CLUSTER_ATTR(buffer_size, 1); 155CLUSTER_ATTR(rsbtbl_size, 1); 156CLUSTER_ATTR(lkbtbl_size, 1); 157CLUSTER_ATTR(dirtbl_size, 1); 158CLUSTER_ATTR(recover_timer, 1); 159CLUSTER_ATTR(toss_secs, 1); 160CLUSTER_ATTR(scan_secs, 1); 161CLUSTER_ATTR(log_debug, 0); | 106}; 107 108struct cluster_attribute { 109 struct configfs_attribute attr; 110 ssize_t (*show)(struct cluster *, char *); 111 ssize_t (*store)(struct cluster *, const char *, size_t); 112}; 113 --- 42 unchanged lines hidden (view full) --- 156CLUSTER_ATTR(buffer_size, 1); 157CLUSTER_ATTR(rsbtbl_size, 1); 158CLUSTER_ATTR(lkbtbl_size, 1); 159CLUSTER_ATTR(dirtbl_size, 1); 160CLUSTER_ATTR(recover_timer, 1); 161CLUSTER_ATTR(toss_secs, 1); 162CLUSTER_ATTR(scan_secs, 1); 163CLUSTER_ATTR(log_debug, 0); |
164CLUSTER_ATTR(protocol, 0); |
|
162 163static struct configfs_attribute *cluster_attrs[] = { 164 [CLUSTER_ATTR_TCP_PORT] = &cluster_attr_tcp_port.attr, 165 [CLUSTER_ATTR_BUFFER_SIZE] = &cluster_attr_buffer_size.attr, 166 [CLUSTER_ATTR_RSBTBL_SIZE] = &cluster_attr_rsbtbl_size.attr, 167 [CLUSTER_ATTR_LKBTBL_SIZE] = &cluster_attr_lkbtbl_size.attr, 168 [CLUSTER_ATTR_DIRTBL_SIZE] = &cluster_attr_dirtbl_size.attr, 169 [CLUSTER_ATTR_RECOVER_TIMER] = &cluster_attr_recover_timer.attr, 170 [CLUSTER_ATTR_TOSS_SECS] = &cluster_attr_toss_secs.attr, 171 [CLUSTER_ATTR_SCAN_SECS] = &cluster_attr_scan_secs.attr, 172 [CLUSTER_ATTR_LOG_DEBUG] = &cluster_attr_log_debug.attr, | 165 166static struct configfs_attribute *cluster_attrs[] = { 167 [CLUSTER_ATTR_TCP_PORT] = &cluster_attr_tcp_port.attr, 168 [CLUSTER_ATTR_BUFFER_SIZE] = &cluster_attr_buffer_size.attr, 169 [CLUSTER_ATTR_RSBTBL_SIZE] = &cluster_attr_rsbtbl_size.attr, 170 [CLUSTER_ATTR_LKBTBL_SIZE] = &cluster_attr_lkbtbl_size.attr, 171 [CLUSTER_ATTR_DIRTBL_SIZE] = &cluster_attr_dirtbl_size.attr, 172 [CLUSTER_ATTR_RECOVER_TIMER] = &cluster_attr_recover_timer.attr, 173 [CLUSTER_ATTR_TOSS_SECS] = &cluster_attr_toss_secs.attr, 174 [CLUSTER_ATTR_SCAN_SECS] = &cluster_attr_scan_secs.attr, 175 [CLUSTER_ATTR_LOG_DEBUG] = &cluster_attr_log_debug.attr, |
176 [CLUSTER_ATTR_PROTOCOL] = &cluster_attr_protocol.attr, |
|
173 NULL, 174}; 175 176enum { 177 COMM_ATTR_NODEID = 0, 178 COMM_ATTR_LOCAL, 179 COMM_ATTR_ADDR, 180}; --- 718 unchanged lines hidden (view full) --- 899#define DEFAULT_BUFFER_SIZE 4096 900#define DEFAULT_RSBTBL_SIZE 256 901#define DEFAULT_LKBTBL_SIZE 1024 902#define DEFAULT_DIRTBL_SIZE 512 903#define DEFAULT_RECOVER_TIMER 5 904#define DEFAULT_TOSS_SECS 10 905#define DEFAULT_SCAN_SECS 5 906#define DEFAULT_LOG_DEBUG 0 | 177 NULL, 178}; 179 180enum { 181 COMM_ATTR_NODEID = 0, 182 COMM_ATTR_LOCAL, 183 COMM_ATTR_ADDR, 184}; --- 718 unchanged lines hidden (view full) --- 903#define DEFAULT_BUFFER_SIZE 4096 904#define DEFAULT_RSBTBL_SIZE 256 905#define DEFAULT_LKBTBL_SIZE 1024 906#define DEFAULT_DIRTBL_SIZE 512 907#define DEFAULT_RECOVER_TIMER 5 908#define DEFAULT_TOSS_SECS 10 909#define DEFAULT_SCAN_SECS 5 910#define DEFAULT_LOG_DEBUG 0 |
911#define DEFAULT_PROTOCOL 0 |
|
907 908struct dlm_config_info dlm_config = { 909 .ci_tcp_port = DEFAULT_TCP_PORT, 910 .ci_buffer_size = DEFAULT_BUFFER_SIZE, 911 .ci_rsbtbl_size = DEFAULT_RSBTBL_SIZE, 912 .ci_lkbtbl_size = DEFAULT_LKBTBL_SIZE, 913 .ci_dirtbl_size = DEFAULT_DIRTBL_SIZE, 914 .ci_recover_timer = DEFAULT_RECOVER_TIMER, 915 .ci_toss_secs = DEFAULT_TOSS_SECS, 916 .ci_scan_secs = DEFAULT_SCAN_SECS, | 912 913struct dlm_config_info dlm_config = { 914 .ci_tcp_port = DEFAULT_TCP_PORT, 915 .ci_buffer_size = DEFAULT_BUFFER_SIZE, 916 .ci_rsbtbl_size = DEFAULT_RSBTBL_SIZE, 917 .ci_lkbtbl_size = DEFAULT_LKBTBL_SIZE, 918 .ci_dirtbl_size = DEFAULT_DIRTBL_SIZE, 919 .ci_recover_timer = DEFAULT_RECOVER_TIMER, 920 .ci_toss_secs = DEFAULT_TOSS_SECS, 921 .ci_scan_secs = DEFAULT_SCAN_SECS, |
917 .ci_log_debug = DEFAULT_LOG_DEBUG | 922 .ci_log_debug = DEFAULT_LOG_DEBUG, 923 .ci_protocol = DEFAULT_PROTOCOL |
918}; 919 | 924}; 925 |