summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server.c
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2010-10-07 06:37:12 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-07 05:43:35 -0700
commitc7b518ab85f6fbcbdbae64c8fa092e998a14d1e9 (patch)
tree4f55db97bf6e843c96637264c8d97219a5b0aa38 /xlators/protocol/server/src/server.c
parentf62484f42230db9d240c9b0eaadac48d845053b1 (diff)
mgmt/Glusterd: Volume set enhancements
- performance.flush-behind, transport.keepalive added - volume info to display the options reconfigured Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1159 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1159
Diffstat (limited to 'xlators/protocol/server/src/server.c')
-rw-r--r--xlators/protocol/server/src/server.c36
1 files changed, 31 insertions, 5 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 4fcce6e99d2..2ff5cf5a94f 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -26,6 +26,7 @@
#include <sys/time.h>
#include <sys/resource.h>
+
#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;
}