summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/glusterfs.h2
-rw-r--r--rpc/rpc-transport/socket/src/socket.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c2
-rw-r--r--xlators/protocol/client/src/client.c2
-rw-r--r--xlators/protocol/server/src/server.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
index 93a01cab985..8335d170bd1 100644
--- a/libglusterfs/src/glusterfs.h
+++ b/libglusterfs/src/glusterfs.h
@@ -343,6 +343,8 @@ enum gf_internal_fop_indicator {
#define GF_LOG_FLUSH_TIMEOUT_MAX_STR "300"
#define GF_LOG_LOCALTIME_DEFAULT 0
+#define GF_NETWORK_TIMEOUT 42
+
#define GF_BACKTRACE_LEN 4096
#define GF_BACKTRACE_FRAME_COUNT 7
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index b1900f08863..a770e6954be 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -3928,7 +3928,7 @@ reconfigure(rpc_transport_t *this, dict_t *options)
int ret = 0;
uint32_t backlog = 0;
uint64_t windowsize = 0;
- uint32_t timeout = 42;
+ uint32_t timeout = GF_NETWORK_TIMEOUT;
int keepaliveidle = GF_KEEPALIVE_TIME;
int keepaliveintvl = GF_KEEPALIVE_INTERVAL;
int keepalivecnt = GF_KEEPALIVE_COUNT;
@@ -4393,7 +4393,7 @@ socket_init(rpc_transport_t *this)
gf_boolean_t tmp_bool = 0;
uint64_t windowsize = GF_DEFAULT_SOCKET_WINDOW_SIZE;
char *optstr = NULL;
- uint32_t timeout = 42;
+ uint32_t timeout = GF_NETWORK_TIMEOUT;
int keepaliveidle = GF_KEEPALIVE_TIME;
int keepaliveintvl = GF_KEEPALIVE_INTERVAL;
int keepalivecnt = GF_KEEPALIVE_COUNT;
@@ -4661,7 +4661,7 @@ struct volume_options options[] = {
{.key = {"transport.tcp-user-timeout"},
.type = GF_OPTION_TYPE_INT,
.op_version = {GD_OP_VERSION_3_10_2},
- .default_value = "42"},
+ .default_value = TOSTRING(GF_NETWORK_TIMEOUT)},
{.key = {"transport.socket.nodelay"},
.type = GF_OPTION_TYPE_BOOL,
.default_value = "1"},
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index ed6263e55f1..99ee00cf6d0 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -1415,7 +1415,6 @@ struct volopt_map_entry glusterd_volopt_map[] = {
{.key = "network.ping-timeout",
.voltype = "protocol/client",
.op_version = 1,
- .value = "42",
.flags = VOLOPT_FLAG_CLIENT_OPT},
{.key = "network.tcp-window-size",
.voltype = "protocol/client",
@@ -1577,7 +1576,6 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.voltype = "protocol/server",
.option = "transport.tcp-user-timeout",
.op_version = GD_OP_VERSION_3_10_2,
- .value = "0", /* 0 - implies "use system default" */
},
{
.key = "server.keepalive-time",
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index c5bf28dcfb6..37c2d9891b6 100644
--- a/xlators/protocol/client/src/client.c
+++ b/xlators/protocol/client/src/client.c
@@ -2939,7 +2939,7 @@ struct volume_options options[] = {
.type = GF_OPTION_TYPE_TIME,
.min = 0,
.max = 1013,
- .default_value = "42",
+ .default_value = TOSTRING(GF_NETWORK_TIMEOUT),
.description = "Time duration for which the client waits to "
"check if the server is responsive.",
.op_version = {1},
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 8416b42b659..8d8e8fc5718 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -1681,7 +1681,7 @@ struct volume_options server_options[] = {
.type = GF_OPTION_TYPE_TIME,
.min = 0,
.max = 1013,
- .default_value = "42", /* default like network.ping-timeout */
+ .default_value = TOSTRING(GF_NETWORK_TIMEOUT),
},
{
.key = {"transport.*"},