summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-diskusage.c16
-rw-r--r--xlators/features/quota/src/quota.c16
2 files changed, 27 insertions, 5 deletions
diff --git a/xlators/cluster/dht/src/dht-diskusage.c b/xlators/cluster/dht/src/dht-diskusage.c
index fe3955ecbb7..d035aca2665 100644
--- a/xlators/cluster/dht/src/dht-diskusage.c
+++ b/xlators/cluster/dht/src/dht-diskusage.c
@@ -135,6 +135,7 @@ int
dht_get_du_info (call_frame_t *frame, xlator_t *this, loc_t *loc)
{
int i = 0;
+ int ret = -1;
dht_conf_t *conf = NULL;
call_frame_t *statfs_frame = NULL;
dht_local_t *statfs_local = NULL;
@@ -164,12 +165,25 @@ dht_get_du_info (call_frame_t *frame, xlator_t *this, loc_t *loc)
goto err;
}
+ statfs_local->params = dict_new ();
+ if (!statfs_local->params)
+ goto err;
+
+ ret = dict_set_int8 (statfs_local->params,
+ GF_INTERNAL_IGNORE_DEEM_STATFS, 1);
+ if (ret) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "Failed to set "
+ GF_INTERNAL_IGNORE_DEEM_STATFS" in dict");
+ goto err;
+ }
+
statfs_local->call_cnt = conf->subvolume_cnt;
for (i = 0; i < conf->subvolume_cnt; i++) {
STACK_WIND (statfs_frame, dht_du_info_cbk,
conf->subvolumes[i],
conf->subvolumes[i]->fops->statfs,
- &tmp_loc, NULL);
+ &tmp_loc, statfs_local->params);
}
conf->last_stat_fetch.tv_sec = tv.tv_sec;
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index c3e730bd1fd..06ef9615a19 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -3808,16 +3808,24 @@ out:
int32_t
quota_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
- quota_local_t *local = NULL;
- int op_errno = 0;
- int ret = -1;
- quota_priv_t *priv = NULL;
+ int op_errno = 0;
+ int ret = -1;
+ int8_t ignore_deem_statfs = 0;
+ quota_priv_t *priv = NULL;
+ quota_local_t *local = NULL;
priv = this->private;
GF_ASSERT (loc);
WIND_IF_QUOTAOFF (priv->is_quota_on, off);
+ ret = dict_get_int8 (xdata, GF_INTERNAL_IGNORE_DEEM_STATFS,
+ &ignore_deem_statfs);
+ ret = 0;
+
+ if (ignore_deem_statfs)
+ goto off;
+
if (priv->consider_statfs && loc->inode) {
local = quota_local_new ();
if (!local) {