summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c37
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c8
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c3
3 files changed, 44 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 448dd65348d..57239c6266d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -254,6 +254,7 @@ out:
return ret;
}
+
int
glusterd_add_volume_detail_to_dict (glusterd_volinfo_t *volinfo,
dict_t *volumes, int count)
@@ -264,6 +265,11 @@ glusterd_add_volume_detail_to_dict (glusterd_volinfo_t *volinfo,
glusterd_brickinfo_t *brickinfo = NULL;
char *buf = NULL;
int i = 1;
+ data_pair_t *pairs = NULL;
+ char reconfig_key[256] = {0, };
+ dict_t *dict = NULL;
+ data_t *value = NULL;
+
GF_ASSERT (volinfo);
GF_ASSERT (volumes);
@@ -309,6 +315,37 @@ glusterd_add_volume_detail_to_dict (glusterd_volinfo_t *volinfo,
goto out;
i++;
}
+
+ dict = volinfo->dict;
+ if (!dict) {
+ ret = -1;
+ goto out;
+ }
+
+ pairs = dict->members_list;
+ if (!pairs) {
+ ret = -1;
+ goto out;
+ }
+
+ while (pairs) {
+ if (1 == glusterd_check_option_exists (pairs->key, NULL)) {
+ value = pairs->value;
+ if (!value) {
+ ret = -1;
+ goto out;
+ }
+ snprintf (reconfig_key, 256, "volume%d.option.%s", count,
+ pairs->key);
+ gf_log ("", GF_LOG_DEBUG,
+ "Setting dict with key=%s, value=%s",
+ reconfig_key, pairs->value->data);
+ ret = dict_set_str (volumes, gf_strdup (reconfig_key),
+ value->data);
+ }
+ pairs = pairs->next;
+ }
+
out:
return ret;
}
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index d867497ccf9..4ae7afcc39d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1087,10 +1087,10 @@ out:
static int
glusterd_op_stage_set_volume (gd1_mgmt_stage_op_req *req, char **op_errstr)
{
- int ret = 0;
- dict_t *dict = NULL;
- char *volname = NULL;
- gf_boolean_t exists = _gf_false;
+ int ret = 0;
+ dict_t *dict = NULL;
+ char *volname = NULL;
+ int exists = 0;
char *key = NULL;
char *value = NULL;
char str[100] = {0, };
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 9d3ceaf5659..cfd7a7396a9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -110,6 +110,7 @@ static struct volopt_map_entry glusterd_volopt_map[] = {
{"performance.cache-priority", "performance/io-cache", "priority",}, /* NODOC */
{"performance.cache-size", "performance/io-cache", },
{"performance.cache-size", "performance/quick-read", },
+ {"performance.flush-behind", "performance/write-behind", "flush-behind",},
{"performance.io-thread-count", "performance/io-threads", "thread-count",},
@@ -124,6 +125,8 @@ static struct volopt_map_entry glusterd_volopt_map[] = {
{"auth.allow", "protocol/server", "!server-auth", "*"},
{"auth.reject", "protocol/server", "!server-auth",},
+
+ {"transport.keepalive", "protocol/server", "transport.socket.keepalive",},
{"performance.write-behind", "performance/write-behind", "!perf", "on"}, /* NODOC */
{"performance.read-ahead", "performance/read-ahead", "!perf", "on"}, /* NODOC */