summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
authorVenkatesh Somyajulu <vsomyaju@redhat.com>2014-06-17 14:45:44 +0530
committerVijay Bellur <vbellur@redhat.com>2014-06-17 05:26:27 -0700
commit3a499d170de2c7df06b127b709d27c64cef98886 (patch)
tree7cdc8d50872c788d2d1051e3fc9c20d6513ccda7 /xlators/mgmt/glusterd
parente232b4c674dad697bb520c34fa4c445d0ababfc3 (diff)
cluster/dht: Bring option to choose gfid or name based hashing
Change-Id: I11794eb2adceb88e75864aede450e904431a6273 BUG: 1095888 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/8049 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c8
2 files changed, 8 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 66b92a712af..fddd1f8f5dc 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -13079,7 +13079,7 @@ glusterd_enable_default_options (glusterd_volinfo_t *volinfo, char *option)
conf = this->private;
GF_ASSERT (conf);
- if (conf->op_version >= 4) {
+ if (conf->op_version >= GD_OP_VERSION_3_6_0) {
/* Set needed volume options in volinfo->dict
* For ex.,
*
@@ -13088,7 +13088,6 @@ glusterd_enable_default_options (glusterd_volinfo_t *volinfo, char *option)
* ...
* }
* */
-
}
out:
return ret;
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 4421e4ddbf7..b1d3fe54f88 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -398,7 +398,13 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.op_version = 3,
.flags = OPT_FLAG_CLIENT_OPT
},
-
+ { .key = "cluster.randomize-hash-range-by-gfid",
+ .voltype = "cluster/distribute",
+ .option = "randomize-hash-range-by-gfid",
+ .type = NO_DOC,
+ .op_version = GD_OP_VERSION_3_6_0,
+ .flags = OPT_FLAG_CLIENT_OPT,
+ },
/* NUFA xlator options (Distribute special case) */
{ .key = "cluster.nufa",
.voltype = "cluster/distribute",