summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorGaurav Yadav <gyadav@redhat.com>2017-02-21 22:35:47 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-04-13 11:32:28 -0400
commit0726b768e83574ee0b08dbde10746c9015c7eb73 (patch)
treea0d8eba4dc965ccfe1cf8021809190e6d20fd338 /xlators
parent560c92862f72128ccd962192b9c4d728386c7bb1 (diff)
glusterd : cluster.brick-multiplex validation is missing while setting it
Currently glusterd allow setting all values while setting cluster.brick-multiplex option. Validation of allowed options is missing. With this patch glusterd will validate the values given while setting cluster.brick-multiplex. > Reviewed-on: https://review.gluster.org/16704 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 60347526d9611035da0e56d55d4814f51cda9367) Change-Id: I938fb16b8f5faa9d31326373cd18632b8aa7ebab BUG: 1438340 Signed-off-by: Gaurav Yadav <gyadav@redhat.com> Reviewed-on: https://review.gluster.org/16982 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Samikshan Bairagya <samikshan@gmail.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index aca7135a2b2..027b65417cd 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -902,7 +902,7 @@ out:
static int
-validate_worm (glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
+validate_boolean (glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
char *value, char **op_errstr)
{
xlator_t *this = NULL;
@@ -2461,7 +2461,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.voltype = "features/worm",
.option = "worm",
.value = "off",
- .validate_fn = validate_worm,
+ .validate_fn = validate_boolean,
.op_version = 2,
.flags = OPT_FLAG_CLIENT_OPT | OPT_FLAG_XLATOR_OPT
},
@@ -2469,7 +2469,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.voltype = "features/worm",
.option = "worm-file-level",
.value = "off",
- .validate_fn = validate_worm,
+ .validate_fn = validate_boolean,
.op_version = GD_OP_VERSION_3_8_0,
.flags = OPT_FLAG_CLIENT_OPT | OPT_FLAG_XLATOR_OPT
},
@@ -3128,7 +3128,8 @@ struct volopt_map_entry glusterd_volopt_map[] = {
{ .key = GLUSTERD_BRICK_MULTIPLEX_KEY,
.voltype = "mgmt/glusterd",
.value = "off",
- .op_version = GD_OP_VERSION_3_10_0
+ .op_version = GD_OP_VERSION_3_10_0,
+ .validate_fn = validate_boolean
},
{ .key = NULL
}