]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
RGW: fix a bug about inconsistent unit of comparison 17958/head
authorgaosibei <gaosb@inspur.com>
Tue, 26 Sep 2017 02:19:22 +0000 (10:19 +0800)
committergaosibei <gaosb@inspur.com>
Fri, 29 Sep 2017 00:44:25 +0000 (08:44 +0800)
Fixes:http://tracker.ceph.com/issues/21590

Signed-off-by: gaosibei <gaosb@inspur.com>
src/rgw/rgw_quota.cc

index d94dc0ca4cf74798d0f5b1317eaa601b8d5df434..ce3d1265facd45b8ab2e210511553486e3a7feca 100644 (file)
@@ -110,10 +110,9 @@ bool RGWQuotaCache<T>::can_use_cached_stats(RGWQuotaInfo& quota, RGWStorageStats
       quota.max_size_soft_threshold = quota.max_size * store->ctx()->_conf->rgw_bucket_quota_soft_threshold;
     }
 
-    const auto cached_stats_num_kb_rounded = rgw_rounded_kb(cached_stats.size_rounded);
-    if (cached_stats_num_kb_rounded >= (uint64_t)quota.max_size_soft_threshold) {
+    if (cached_stats.size_rounded  >= (uint64_t)quota.max_size_soft_threshold) {
       ldout(store->ctx(), 20) << "quota: can't use cached stats, exceeded soft threshold (size): "
-        << cached_stats_num_kb_rounded << " >= " << quota.max_size_soft_threshold << dendl;
+        << cached_stats.size_rounded << " >= " << quota.max_size_soft_threshold << dendl;
       return false;
     }
   }