From c7b518ab85f6fbcbdbae64c8fa092e998a14d1e9 Mon Sep 17 00:00:00 2001 From: Kaushik BV Date: Thu, 7 Oct 2010 06:37:12 +0000 Subject: mgmt/Glusterd: Volume set enhancements - performance.flush-behind, transport.keepalive added - volume info to display the options reconfigured Signed-off-by: Kaushik BV Signed-off-by: Vijay Bellur BUG: 1159 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1159 --- xlators/protocol/server/src/server.c | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) (limited to 'xlators/protocol') diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 4fcce6e99..2ff5cf5a9 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -26,6 +26,7 @@ #include #include + #include "server.h" #include "server-helpers.h" #include "glusterfs3-xdr.h" @@ -544,14 +545,20 @@ int reconfigure (xlator_t *this, dict_t *options) { - server_conf_t *conf =NULL; - int inode_lru_limit; - gf_boolean_t trace; - data_t *data; - int ret; + server_conf_t *conf =NULL; + rpcsvc_t *rpc_conf; + rpcsvc_listener_t *listeners; + int inode_lru_limit; + gf_boolean_t trace; + data_t *data; + int ret = 0; conf = this->private; + if (!conf) { + gf_log (this->name, GF_LOG_DEBUG, "conf == null!!!"); + goto out; + } if (dict_get_int32 ( options, "inode-lru-limit", &inode_lru_limit) == 0){ conf->inode_lru_limit = inode_lru_limit; gf_log (this->name, GF_LOG_TRACE, "Reconfigured inode-lru-limit" @@ -589,8 +596,27 @@ reconfigure (xlator_t *this, dict_t *options) dict_unref (conf->auth_modules); goto out; } + + rpc_conf = conf->rpc; + if (!rpc_conf) { + gf_log (this->name, GF_LOG_ERROR, "No rpc_conf !!!!"); + goto out; + } + + list_for_each_entry (listeners, &(rpc_conf->listeners), list) { + if (listeners->trans != NULL) { + if (listeners->trans->reconfigure ) + listeners->trans->reconfigure (listeners->trans, options); + else + gf_log (this->name, GF_LOG_ERROR, + "Reconfigure not found for transport" ); + } + } + + out: + gf_log ("", GF_LOG_DEBUG, "returning %d", ret); return ret; } -- cgit