From 1aab3dae55b3e094297d57ec9d196bc401b4f7aa Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Wed, 18 May 2016 17:04:40 +0200 Subject: [PATCH] rgw: fix rounding in RGWQuotaInfoDefApplier. Signed-off-by: Radoslaw Zarzynski --- src/rgw/rgw_quota.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.47.3