diff options
Diffstat (limited to 'xlators/cluster/ec/src/ec-generic.c')
-rw-r--r-- | xlators/cluster/ec/src/ec-generic.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/xlators/cluster/ec/src/ec-generic.c b/xlators/cluster/ec/src/ec-generic.c index d8c6d91fa89..6ffdbcf01d1 100644 --- a/xlators/cluster/ec/src/ec-generic.c +++ b/xlators/cluster/ec/src/ec-generic.c @@ -1107,7 +1107,9 @@ void ec_wind_statfs(ec_t * ec, ec_fop_data_t * fop, int32_t idx) int32_t ec_manager_statfs(ec_fop_data_t * fop, int32_t state) { - ec_cbk_data_t * cbk; + ec_cbk_data_t *cbk = NULL; + gf_boolean_t deem_statfs_enabled = _gf_false; + int ret = 0; switch (state) { @@ -1137,9 +1139,15 @@ int32_t ec_manager_statfs(ec_fop_data_t * fop, int32_t state) { ec_t * ec = fop->xl->private; - cbk->statvfs.f_blocks *= ec->fragments; - cbk->statvfs.f_bfree *= ec->fragments; - cbk->statvfs.f_bavail *= ec->fragments; + if (cbk->xdata) + ret = dict_get_int8 (cbk->xdata, "quota-deem-statfs", + (int8_t *)&deem_statfs_enabled); + + if (ret != 0 || deem_statfs_enabled == _gf_false) { + cbk->statvfs.f_blocks *= ec->fragments; + cbk->statvfs.f_bfree *= ec->fragments; + cbk->statvfs.f_bavail *= ec->fragments; + } } } else |