~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to fs/dlm/config.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
        unsigned int cl_log_debug;
101
101
        unsigned int cl_protocol;
102
102
        unsigned int cl_timewarn_cs;
 
103
        unsigned int cl_waitwarn_us;
103
104
};
104
105
 
105
106
enum {
114
115
        CLUSTER_ATTR_LOG_DEBUG,
115
116
        CLUSTER_ATTR_PROTOCOL,
116
117
        CLUSTER_ATTR_TIMEWARN_CS,
 
118
        CLUSTER_ATTR_WAITWARN_US,
117
119
};
118
120
 
119
121
struct cluster_attribute {
166
168
CLUSTER_ATTR(log_debug, 0);
167
169
CLUSTER_ATTR(protocol, 0);
168
170
CLUSTER_ATTR(timewarn_cs, 1);
 
171
CLUSTER_ATTR(waitwarn_us, 0);
169
172
 
170
173
static struct configfs_attribute *cluster_attrs[] = {
171
174
        [CLUSTER_ATTR_TCP_PORT] = &cluster_attr_tcp_port.attr,
179
182
        [CLUSTER_ATTR_LOG_DEBUG] = &cluster_attr_log_debug.attr,
180
183
        [CLUSTER_ATTR_PROTOCOL] = &cluster_attr_protocol.attr,
181
184
        [CLUSTER_ATTR_TIMEWARN_CS] = &cluster_attr_timewarn_cs.attr,
 
185
        [CLUSTER_ATTR_WAITWARN_US] = &cluster_attr_waitwarn_us.attr,
182
186
        NULL,
183
187
};
184
188
 
439
443
        cl->cl_log_debug = dlm_config.ci_log_debug;
440
444
        cl->cl_protocol = dlm_config.ci_protocol;
441
445
        cl->cl_timewarn_cs = dlm_config.ci_timewarn_cs;
 
446
        cl->cl_waitwarn_us = dlm_config.ci_waitwarn_us;
442
447
 
443
448
        space_list = &sps->ss_group;
444
449
        comm_list = &cms->cs_group;
977
982
/* Config file defaults */
978
983
#define DEFAULT_TCP_PORT       21064
979
984
#define DEFAULT_BUFFER_SIZE     4096
980
 
#define DEFAULT_RSBTBL_SIZE      256
 
985
#define DEFAULT_RSBTBL_SIZE     1024
981
986
#define DEFAULT_LKBTBL_SIZE     1024
982
 
#define DEFAULT_DIRTBL_SIZE      512
 
987
#define DEFAULT_DIRTBL_SIZE     1024
983
988
#define DEFAULT_RECOVER_TIMER      5
984
989
#define DEFAULT_TOSS_SECS         10
985
990
#define DEFAULT_SCAN_SECS          5
986
991
#define DEFAULT_LOG_DEBUG          0
987
992
#define DEFAULT_PROTOCOL           0
988
993
#define DEFAULT_TIMEWARN_CS      500 /* 5 sec = 500 centiseconds */
 
994
#define DEFAULT_WAITWARN_US        0
989
995
 
990
996
struct dlm_config_info dlm_config = {
991
997
        .ci_tcp_port = DEFAULT_TCP_PORT,
998
1004
        .ci_scan_secs = DEFAULT_SCAN_SECS,
999
1005
        .ci_log_debug = DEFAULT_LOG_DEBUG,
1000
1006
        .ci_protocol = DEFAULT_PROTOCOL,
1001
 
        .ci_timewarn_cs = DEFAULT_TIMEWARN_CS
 
1007
        .ci_timewarn_cs = DEFAULT_TIMEWARN_CS,
 
1008
        .ci_waitwarn_us = DEFAULT_WAITWARN_US
1002
1009
};
1003
1010