summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c15
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c15
2 files changed, 13 insertions, 17 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 7cb858b01..001825941 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -1666,13 +1666,16 @@ server_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
}
/* Check for compress volume option, and add it to the graph on server side */
- if (dict_get_str_boolean (set_dict, "network.compression", 0)) {
+ ret = dict_get_str_boolean (set_dict, "network.compression", 0);
+ if (ret == -1)
+ goto out;
+ if (ret) {
xl = volgen_graph_add (graph, "features/cdc", volname);
if (!xl) {
ret = -1;
goto out;
}
- ret = dict_set_str (set_dict, "network.compression.mode", "server");
+ ret = xlator_set_option (xl, "mode", "server");
if (ret)
goto out;
}
@@ -2543,16 +2546,18 @@ client_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
goto out;
/* Check for compress volume option, and add it to the graph on client side */
- if (dict_get_str_boolean (set_dict, "network.compression", 0)) {
+ ret = dict_get_str_boolean (set_dict, "network.compression", 0);
+ if (ret == -1)
+ goto out;
+ if (ret) {
xl = volgen_graph_add (graph, "features/cdc", volname);
if (!xl) {
ret = -1;
goto out;
}
- ret = dict_set_str (set_dict, "network.compression.mode", "client");
+ ret = xlator_set_option (xl, "mode", "client");
if (ret)
goto out;
-
}
ret = glusterd_volinfo_get_boolean (volinfo, "features.encryption");
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 6e7a80b92..7f094c439 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -1020,39 +1020,30 @@ struct volopt_map_entry glusterd_volopt_map[] = {
*/
{ .key = "network.compression",
.voltype = "features/cdc",
+ .option = "!feat",
.value = "off",
- .type = NO_DOC,
.op_version = 3,
- .description = "enable/disable network compression translator"
- },
- { .key = "network.compression.mode",
- .voltype = "features/cdc",
- .option = "mode",
- .type = NO_DOC,
- .op_version = 3
+ .description = "enable/disable network compression translator",
+ .flags = OPT_FLAG_XLATOR_OPT
},
{ .key = "network.compression.window-size",
.voltype = "features/cdc",
.option = "window-size",
- .type = NO_DOC,
.op_version = 3
},
{ .key = "network.compression.mem-level",
.voltype = "features/cdc",
.option = "mem-level",
- .type = NO_DOC,
.op_version = 3
},
{ .key = "network.compression.min-size",
.voltype = "features/cdc",
.option = "min-size",
- .type = NO_DOC,
.op_version = 3
},
{ .key = "network.compression.compression-level",
.voltype = "features/cdc",
.option = "compression-level",
- .type = NO_DOC,
.op_version = 3
},
{ .key = "network.compression.debug",