summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2016-01-25 13:27:42 +0530
committerDan Lambright <dlambrig@redhat.com>2016-01-25 08:05:58 -0800
commit9ce86c63e349eaafbd923b0b541d75e929ecbae7 (patch)
treea4f95de9efd04537f7ae86c00efc918618d0f7a9 /xlators/cluster/dht
parentf17c2e991e45b83f7d21de1b976b59862ea173ab (diff)
cluster/tier: Ignore quota-deem-statfs for watermark calculation
The tier process watermark calculations were incorrect when the quota-deem-statfs option was enabled. We now ignore this while calculating hot tier usage to determine watermark levels. Change-Id: I308bc24432e2fa5ad1d5703e80fc391433538bbb BUG: 1301473 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/13288 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Tested-by: mohammed rafi kc <rkavunga@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r--xlators/cluster/dht/src/tier.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index d2b65ea6f86..2e0a7c78af4 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -104,6 +104,25 @@ tier_check_watermark (xlator_t *this, loc_t *root_loc)
goto exit;
}
+ xdata = dict_new ();
+ if (!xdata) {
+ gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
+ DHT_MSG_NO_MEMORY,
+ "failed to allocate dictionary");
+ ret = -1;
+ goto exit;
+ }
+
+ ret = dict_set_int8 (xdata, GF_INTERNAL_IGNORE_DEEM_STATFS, 1);
+ if (ret) {
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ DHT_MSG_DICT_SET_FAILED,
+ "Failed to set "
+ GF_INTERNAL_IGNORE_DEEM_STATFS" in dict");
+ ret = -1;
+ goto exit;
+ }
+
/* Find how much free space is on the hot subvolume. Then see if that value */
/* is less than or greater than user defined watermarks. Stash results in */
/* the tier_conf data structure. */
@@ -145,6 +164,8 @@ tier_check_watermark (xlator_t *this, loc_t *root_loc)
}
exit:
+ if (xdata)
+ dict_unref (xdata);
return ret;
}