summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorhari gowtham <hgowtham@redhat.com>2017-05-04 15:49:59 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-05-23 23:48:48 +0000
commit736d839a9b84fdebbf4f861027f3c27afcd8f933 (patch)
tree22dc66fef6eacf4caf3f73db53b1c6faea0340d1 /xlators
parent25a5333f5315106fc06aa82abb7dce96a54b64e6 (diff)
Tier: Watermark check for hi and low value being equal
Problem: Both low and hi watermark can be set to same value as the check missed the case for being equal. Fix: Add the check to both the hi and low values being equal along with the low value being higher than hi value. >Change-Id: Ia235163aeefdcb2a059e2e58a5cfd8fb7f1a4c64 >BUG: 1447960 >Signed-off-by: hari gowtham <hgowtham@redhat.com> >Reviewed-on: https://review.gluster.org/17175 >Smoke: Gluster Build System <jenkins@build.gluster.org> >Tested-by: hari gowtham <hari.gowtham005@gmail.com> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >Reviewed-by: Milind Changire <mchangir@redhat.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Signed-off-by: hari gowtham <hgowtham@redhat.com> Change-Id: Ia235163aeefdcb2a059e2e58a5cfd8fb7f1a4c64 BUG: 1454597 Reviewed-on: https://review.gluster.org/17364 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: hari gowtham <hari.gowtham005@gmail.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 736b4ed89c9..ef8a1bb8039 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -447,9 +447,10 @@ validate_tier (glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
gf_string2bytesize_uint64 (current_wm_low,
&wm_low);
}
- if (wm_low > wm_hi) {
+ if (wm_low >= wm_hi) {
snprintf (errstr, sizeof (errstr), "lower watermark"
- " cannot exceed upper watermark.");
+ " cannot be equal or exceed upper "
+ "watermark.");
gf_msg (this->name, GF_LOG_ERROR, EINVAL,
GD_MSG_INCOMPATIBLE_VALUE, "%s", errstr);
*op_errstr = gf_strdup (errstr);