summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtests/basic/cdc.t36
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c8
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c27
3 files changed, 38 insertions, 33 deletions
diff --git a/tests/basic/cdc.t b/tests/basic/cdc.t
index 4cd915aa9ca..69f39f7d1a4 100755
--- a/tests/basic/cdc.t
+++ b/tests/basic/cdc.t
@@ -24,21 +24,21 @@ EXPECT 'off' volinfo_field $V0 'performance.quick-read'
TEST $CLI volume set $V0 strict-write-ordering on
EXPECT 'on' volinfo_field $V0 'performance.strict-write-ordering'
-## Turn on cdc xlator by setting features.compress to on
-TEST $CLI volume set $V0 compress on
-EXPECT 'on' volinfo_field $V0 'features.compress'
-EXPECT 'server' volinfo_field $V0 'compress.mode'
+## Turn on cdc xlator by setting network.compression to on
+TEST $CLI volume set $V0 network.compression on
+EXPECT 'on' volinfo_field $V0 'network.compression'
+EXPECT 'server' volinfo_field $V0 'network.compression.mode'
-## Make sure that user cannot change compress.mode
+## Make sure that user cannot change network.compression.mode
## This would break the cdc xlator if allowed!
-TEST $CLI volume set $V0 compress.mode client
-EXPECT 'server' volinfo_field $V0 'compress.mode'
+TEST $CLI volume set $V0 network.compression.mode client
+EXPECT 'server' volinfo_field $V0 'network.compression.mode'
-## Turn on compress.debug option
+## Turn on network.compression.debug option
## This will dump compressed data onto disk as gzip file
## This is used to check if compression actually happened
-TEST $CLI volume set $V0 compress.debug on
-EXPECT 'on' volinfo_field $V0 'compress.debug'
+TEST $CLI volume set $V0 network.compression.debug on
+EXPECT 'on' volinfo_field $V0 'network.compression.debug'
## Start the volume
TEST $CLI volume start $V0;
@@ -96,11 +96,11 @@ TEST umount $M0
TEST $CLI volume stop $V0;
EXPECT 'Stopped' volinfo_field $V0 'Status';
-## Turn on compress.min-size and set it to 100 bytes
+## Turn on network.compression.min-size and set it to 100 bytes
## Compression should not take place if file size
## is less than 100 bytes
-TEST $CLI volume set $V0 compress.min-size 100
-EXPECT '100' volinfo_field $V0 'compress.min-size'
+TEST $CLI volume set $V0 network.compression.min-size 100
+EXPECT '100' volinfo_field $V0 'network.compression.min-size'
## Start the volume
TEST $CLI volume start $V0;
@@ -118,11 +118,11 @@ TEST ! test -e /tmp/cdcdump.gz
TEST rm -f /tmp/cdc* $M0/cdc*
TEST umount $M0
-## Reset the compress options
-TEST $CLI volume reset $V0 compress.debug
-TEST $CLI volume reset $V0 compress.min-size
-TEST $CLI volume reset $V0 compress.mode
-TEST $CLI volume reset $V0 features.compress
+## Reset the network.compression options
+TEST $CLI volume reset $V0 network.compression.debug
+TEST $CLI volume reset $V0 network.compression.min-size
+TEST $CLI volume reset $V0 network.compression.mode
+TEST $CLI volume reset $V0 network.compression
## Stop the volume
TEST $CLI volume stop $V0;
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 0a674634956..8d7e09838a7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -1657,13 +1657,13 @@ 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, "features.compress", 0)) {
+ if (dict_get_str_boolean (set_dict, "network.compression", 0)) {
xl = volgen_graph_add (graph, "features/cdc", volname);
if (!xl) {
ret = -1;
goto out;
}
- ret = dict_set_str (set_dict, "compress.mode", "server");
+ ret = dict_set_str (set_dict, "network.compression.mode", "server");
if (ret)
goto out;
}
@@ -2531,13 +2531,13 @@ 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, "features.compress", 0)) {
+ if (dict_get_str_boolean (set_dict, "network.compression", 0)) {
xl = volgen_graph_add (graph, "features/cdc", volname);
if (!xl) {
ret = -1;
goto out;
}
- ret = dict_set_str (set_dict, "compress.mode", "client");
+ ret = dict_set_str (set_dict, "network.compression.mode", "client");
if (ret)
goto out;
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index b1989567a4d..e7aa1cd7c10 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -1010,47 +1010,52 @@ struct volopt_map_entry glusterd_volopt_map[] = {
#ifdef HAVE_LIB_Z
/* Compressor-decompressor xlator options
- * defaults used from xlator/feature/compress/src/cdc.h
+ * defaults used from xlator/features/compress/src/cdc.h
*/
- { .key = "features.compress",
+ { .key = "network.compression",
.voltype = "features/cdc",
- .option = "!compress",
.value = "off",
.type = NO_DOC,
.op_version = 2,
- .description = "enable/disable compression translator"
+ .description = "enable/disable network compression translator"
},
- { .key = "compress.mode",
+ { .key = "network.compression.mode",
.voltype = "features/cdc",
+ .option = "mode",
.type = NO_DOC,
.op_version = 2
},
- { .key = "compress.window-size",
+ { .key = "network.compression.window-size",
.voltype = "features/cdc",
+ .option = "window-size",
.type = NO_DOC,
.op_version = 2
},
- { .key = "compress.mem-level",
+ { .key = "network.compression.mem-level",
.voltype = "features/cdc",
+ .option = "mem-level",
.type = NO_DOC,
.op_version = 2
},
- { .key = "compress.min-size",
+ { .key = "network.compression.min-size",
.voltype = "features/cdc",
+ .option = "min-size",
.type = NO_DOC,
.op_version = 2
},
- { .key = "compress.compression-level",
+ { .key = "network.compression.compression-level",
.voltype = "features/cdc",
+ .option = "compression-level",
.type = NO_DOC,
.op_version = 2
},
- { .key = "compress.debug",
+ { .key = "network.compression.debug",
.voltype = "features/cdc",
+ .option = "debug",
.type = NO_DOC,
.op_version = 2
},
- #endif
+#endif
/* Quota xlator options */
{ .key = VKEY_FEATURES_LIMIT_USAGE,