From: Radoslaw Zarzynski Date: Wed, 18 May 2016 15:04:40 +0000 (+0200) Subject: rgw: fix rounding in RGWQuotaInfoDefApplier. X-Git-Tag: v11.0.0~349^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1aab3dae55b3e094297d57ec9d196bc401b4f7aa;p=ceph.git rgw: fix rounding in RGWQuotaInfoDefApplier. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/rgw/rgw_quota.cc b/src/rgw/rgw_quota.cc index af5150f13913..39c1cc2d0515 100644 --- a/src/rgw/rgw_quota.cc +++ b/src/rgw/rgw_quota.cc @@ -731,10 +731,11 @@ bool RGWQuotaInfoDefApplier::is_size_exceeded(const char * const entity, } const uint64_t cur_size = stats.size_rounded; + const uint64_t new_size = rgw_rounded_objsize(size); - if (cur_size + size > static_cast(qinfo.max_size)) { + if (cur_size + new_size > static_cast(qinfo.max_size)) { dout(10) << "quota exceeded: stats.size_rounded=" << stats.size_rounded - << " size=" << size << " " + << " size=" << new_size << " " << entity << "_quota.max_size=" << qinfo.max_size << dendl; return true; }