aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dlm/config.c')
-rw-r--r--fs/dlm/config.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/dlm/config.c b/fs/dlm/config.c
index 5a3d390cc82..2909abf1bbc 100644
--- a/fs/dlm/config.c
+++ b/fs/dlm/config.c
@@ -90,6 +90,7 @@ struct cluster {
90 unsigned int cl_scan_secs; 90 unsigned int cl_scan_secs;
91 unsigned int cl_log_debug; 91 unsigned int cl_log_debug;
92 unsigned int cl_protocol; 92 unsigned int cl_protocol;
93 unsigned int cl_timewarn_cs;
93}; 94};
94 95
95enum { 96enum {
@@ -103,6 +104,7 @@ enum {
103 CLUSTER_ATTR_SCAN_SECS, 104 CLUSTER_ATTR_SCAN_SECS,
104 CLUSTER_ATTR_LOG_DEBUG, 105 CLUSTER_ATTR_LOG_DEBUG,
105 CLUSTER_ATTR_PROTOCOL, 106 CLUSTER_ATTR_PROTOCOL,
107 CLUSTER_ATTR_TIMEWARN_CS,
106}; 108};
107 109
108struct cluster_attribute { 110struct cluster_attribute {
@@ -162,6 +164,7 @@ CLUSTER_ATTR(toss_secs, 1);
162CLUSTER_ATTR(scan_secs, 1); 164CLUSTER_ATTR(scan_secs, 1);
163CLUSTER_ATTR(log_debug, 0); 165CLUSTER_ATTR(log_debug, 0);
164CLUSTER_ATTR(protocol, 0); 166CLUSTER_ATTR(protocol, 0);
167CLUSTER_ATTR(timewarn_cs, 1);
165 168
166static struct configfs_attribute *cluster_attrs[] = { 169static struct configfs_attribute *cluster_attrs[] = {
167 [CLUSTER_ATTR_TCP_PORT] = &cluster_attr_tcp_port.attr, 170 [CLUSTER_ATTR_TCP_PORT] = &cluster_attr_tcp_port.attr,
@@ -174,6 +177,7 @@ static struct configfs_attribute *cluster_attrs[] = {
174 [CLUSTER_ATTR_SCAN_SECS] = &cluster_attr_scan_secs.attr, 177 [CLUSTER_ATTR_SCAN_SECS] = &cluster_attr_scan_secs.attr,
175 [CLUSTER_ATTR_LOG_DEBUG] = &cluster_attr_log_debug.attr, 178 [CLUSTER_ATTR_LOG_DEBUG] = &cluster_attr_log_debug.attr,
176 [CLUSTER_ATTR_PROTOCOL] = &cluster_attr_protocol.attr, 179 [CLUSTER_ATTR_PROTOCOL] = &cluster_attr_protocol.attr,
180 [CLUSTER_ATTR_TIMEWARN_CS] = &cluster_attr_timewarn_cs.attr,
177 NULL, 181 NULL,
178}; 182};
179 183
@@ -916,6 +920,7 @@ int dlm_our_addr(struct sockaddr_storage *addr, int num)
916#define DEFAULT_SCAN_SECS 5 920#define DEFAULT_SCAN_SECS 5
917#define DEFAULT_LOG_DEBUG 0 921#define DEFAULT_LOG_DEBUG 0
918#define DEFAULT_PROTOCOL 0 922#define DEFAULT_PROTOCOL 0
923#define DEFAULT_TIMEWARN_CS 500 /* 5 sec = 500 centiseconds */
919 924
920struct dlm_config_info dlm_config = { 925struct dlm_config_info dlm_config = {
921 .ci_tcp_port = DEFAULT_TCP_PORT, 926 .ci_tcp_port = DEFAULT_TCP_PORT,
@@ -927,6 +932,7 @@ struct dlm_config_info dlm_config = {
927 .ci_toss_secs = DEFAULT_TOSS_SECS, 932 .ci_toss_secs = DEFAULT_TOSS_SECS,
928 .ci_scan_secs = DEFAULT_SCAN_SECS, 933 .ci_scan_secs = DEFAULT_SCAN_SECS,
929 .ci_log_debug = DEFAULT_LOG_DEBUG, 934 .ci_log_debug = DEFAULT_LOG_DEBUG,
930 .ci_protocol = DEFAULT_PROTOCOL 935 .ci_protocol = DEFAULT_PROTOCOL,
936 .ci_timewarn_cs = DEFAULT_TIMEWARN_CS
931}; 937};
932 938