summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorhari gowtham <hgowtham@redhat.com>2017-05-04 15:49:59 +0530
committerRaghavendra Talur <rtalur@redhat.com>2017-05-12 19:58:26 +0000
commite07337d56ea91e75c48ccdc8c386ce892969ca62 (patch)
tree244ee3c6327644504f7480601b6f24a93f98e180 /xlators
parent409806eb813a64319d301464e08c87df71382444 (diff)
Tier: Watermark check for hi and low value being equal
back-port of : https://review.gluster.org/17175 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> Change-Id: Ia235163aeefdcb2a059e2e58a5cfd8fb7f1a4c64 BUG: 1448790 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: https://review.gluster.org/17202 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> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
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 43f3999f88c..bb3e2100901 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);