diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2015-08-03 13:28:09 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-08-12 22:05:57 -0700 |
commit | 6ac0fd5707c5ab8a45d4a2d888059eeb3ce843c7 (patch) | |
tree | 73cdb2ed1b381ad249a933b6ce2d7ebbeaade133 /xlators/protocol | |
parent | d636c0b1cdf7e8897abbd734b2651045fb9ed113 (diff) |
client, rpc: make ping-timeout configurable for glusterfs clients
Change-Id: Idd94adb0457aaffce7330f56f98cebafa2c4dae8
BUG: 1250810
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/11818
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
(cherry picked from commit 3403370ebeaf16567b79022c6ac48b2e0cd50db5)
Reviewed-on: http://review.gluster.org/11848
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/client/src/client.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index fb45128893e..db7a07a4fb8 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -2374,21 +2374,22 @@ client_check_event_threads (xlator_t *this, clnt_conf_t *conf, int32_t old, int reconfigure (xlator_t *this, dict_t *options) { - clnt_conf_t *conf = NULL; - int ret = -1; - int subvol_ret = 0; - char *old_remote_subvol = NULL; - char *new_remote_subvol = NULL; - char *old_remote_host = NULL; - char *new_remote_host = NULL; - int32_t new_nthread = 0; + clnt_conf_t *conf = NULL; + int ret = -1; + int subvol_ret = 0; + char *old_remote_subvol = NULL; + char *new_remote_subvol = NULL; + char *old_remote_host = NULL; + char *new_remote_host = NULL; + int32_t new_nthread = 0; + struct rpc_clnt_config rpc_config = {0,}; conf = this->private; GF_OPTION_RECONF ("frame-timeout", conf->rpc_conf.rpc_timeout, options, int32, out); - GF_OPTION_RECONF ("ping-timeout", conf->opt.ping_timeout, + GF_OPTION_RECONF ("ping-timeout", rpc_config.ping_timeout, options, int32, out); GF_OPTION_RECONF ("event-threads", new_nthread, options, @@ -2430,6 +2431,10 @@ reconfigure (xlator_t *this, dict_t *options) } } + /* Reconfiguring client xlator's @rpc with new frame-timeout + * and ping-timeout */ + rpc_clnt_reconfig (conf->rpc, &rpc_config); + GF_OPTION_RECONF ("filter-O_DIRECT", conf->filter_o_direct, options, bool, out); |