]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix rounding in RGWQuotaInfoDefApplier. 9037/head
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Wed, 18 May 2016 15:04:40 +0000 (17:04 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Mon, 30 May 2016 09:42:56 +0000 (11:42 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_quota.cc

index af5150f139136dd744c8e6ede5ed65c8cac3fcf0..39c1cc2d0515bb133ea544dd7777243fc83ae5da 100644 (file)
@@ -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<uint64_t>(qinfo.max_size)) {
+  if (cur_size + new_size > static_cast<uint64_t>(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;
   }