summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_quota.cc
diff options
context:
space:
mode:
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>2016-05-18 17:04:40 +0200
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>2016-05-30 11:42:56 +0200
commit1aab3dae55b3e094297d57ec9d196bc401b4f7aa (patch)
tree82c9a08e546f193055f0085b787c8468982137f5 /src/rgw/rgw_quota.cc
parentrgw: dump quota info in Swift API's responses. (diff)
downloadceph-1aab3dae55b3e094297d57ec9d196bc401b4f7aa.tar.xz
ceph-1aab3dae55b3e094297d57ec9d196bc401b4f7aa.zip
rgw: fix rounding in RGWQuotaInfoDefApplier.
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
Diffstat (limited to 'src/rgw/rgw_quota.cc')
-rw-r--r--src/rgw/rgw_quota.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rgw/rgw_quota.cc b/src/rgw/rgw_quota.cc
index af5150f1391..39c1cc2d051 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<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;
}