diff options
author | karthik-us <ksubrahm@redhat.com> | 2017-12-28 18:42:16 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2017-12-29 11:19:52 +0000 |
commit | cc425b0de57d574f6e68b6ef5edfdf99cd8353af (patch) | |
tree | a505876a90b0669999697ef4a25aa877dc20646c /xlators/cluster | |
parent | e126368f6b5231fb2acf307fbd8e343e52d61885 (diff) |
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 <ksubrahm@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/afr/src/afr.c | 3 |
1 files changed, 2 insertions, 1 deletions
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"}, |