diff options
| author | Niels de Vos <ndevos@redhat.com> | 2014-01-24 10:38:16 +0100 | 
|---|---|---|
| committer | Vijay Bellur <vbellur@redhat.com> | 2014-01-26 21:40:57 -0800 | 
| commit | 3744b1dfe3baedfd2f210edd7680454a5e32296f (patch) | |
| tree | 05bdaa0b3ca92bb078451d4226facd77b94c0fe0 /xlators | |
| parent | aa1c0e7f855504c3c7dc6890ada451385a6c523e (diff) | |
features/compress: rename "compress" option to "network.compression"
Prevent mistaking the "compress" options for storage (at rest)
compression. The cdc-xlator is implemented to support compressing of
network traffic (READ and WRITE FOPs).
URL: http://www.gluster.org/community/documentation/index.php/Features/On-Wire_Compression_+_Decompression
Master-Change-Id: I9fedf4106dcb226d135ab92e4b533aff284881d7
Master-Reviewed-on: http://review.gluster.org/6765
Change-Id: Ib882af855b36df93fac46236c349c33dd4c3ced4
BUG: 1053670
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/6773
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Diffstat (limited to 'xlators')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 8 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-set.c | 27 | 
2 files changed, 20 insertions, 15 deletions
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 131f96ce667..447a5460dd1 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -1000,47 +1000,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,  | 
