From: gaosibei Date: Tue, 26 Sep 2017 02:19:22 +0000 (+0800) Subject: RGW: fix a bug about inconsistent unit of comparison X-Git-Tag: v13.0.1~727^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cb39f065d6eba87cf1fc2e99334322bf63092df3;p=ceph.git RGW: fix a bug about inconsistent unit of comparison Fixes:http://tracker.ceph.com/issues/21590 Signed-off-by: gaosibei --- diff --git a/src/rgw/rgw_quota.cc b/src/rgw/rgw_quota.cc index d94dc0ca4cf7..ce3d1265facd 100644 --- a/src/rgw/rgw_quota.cc +++ b/src/rgw/rgw_quota.cc @@ -110,10 +110,9 @@ bool RGWQuotaCache::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; } }