From cc425b0de57d574f6e68b6ef5edfdf99cd8353af Mon Sep 17 00:00:00 2001 From: karthik-us Date: Thu, 28 Dec 2017 18:42:16 +0530 Subject: mgmt/glusterd: Adding validation for setting quorum-count In a replicated volume it was allowing to set the quorum-count value between the range [1 - 2147483647]. This patch adds validation for allowing only maximum of replica_count number of quorum-count value to be set on a volume. Change-Id: I13952f3c6cf498c9f2b91161503fc0fba9d94898 BUG: 1529515 Signed-off-by: karthik-us --- xlators/cluster/afr/src/afr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/afr/src/afr.c') diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index aee150123ba..10b6c2f9463 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -1035,8 +1035,9 @@ struct volume_options options[] = { .flags = OPT_FLAG_CLIENT_OPT | OPT_FLAG_SETTABLE | OPT_FLAG_DOC, .tags = {"replicate"}, /*.option = quorum-count*/ + /*.validate_fn = validate_quorum_count*/ .description = "If quorum-type is \"fixed\" only allow writes if " - "this many bricks or present. Other quorum types " + "this many bricks are present. Other quorum types " "will OVERWRITE this value.", }, { .key = {"quorum-reads"}, -- cgit