path: root/xlators/mgmt/glusterd/src/glusterd-volume-set.c
diff options
authorhari gowtham <>2017-05-04 15:49:59 +0530
committerAtin Mukherjee <>2017-05-08 03:58:18 +0000
commit2502162502009d4be75e67e49d71f3f38aaa7595 (patch)
tree5cdd5d57af751bfcd738aadc14f0f498bd454df0 /xlators/mgmt/glusterd/src/glusterd-volume-set.c
parent1538b7296cc0a3150f33190f97dc99c9ca126322 (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 <> Reviewed-on: Smoke: Gluster Build System <> Tested-by: hari gowtham <> Reviewed-by: Atin Mukherjee <> Reviewed-by: Milind Changire <> NetBSD-regression: NetBSD Build System <> CentOS-regression: Gluster Build System <>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-set.c')
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 1b26f7d8397..a5659248253 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,
- 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,
*op_errstr = gf_strdup (errstr);