From: fang yuxiang Date: Thu, 4 Jan 2018 03:45:48 +0000 (+0800) Subject: rgw: update quota is inconsistent at add/del object with compression X-Git-Tag: wip-pdonnell-testing-20180317.202121~669^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=69edaa1ee0925867bf2c1d654790997592e225ae;p=ceph-ci.git rgw: update quota is inconsistent at add/del object with compression Fixes: http://tracker.ceph.com/issues/22568 Signed-off-by: fang yuxiang fang.yuxiang@eisoo.com --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 96af0ab9d15..3db13fa3d91 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -8856,7 +8856,7 @@ int RGWRados::Object::Delete::delete_obj() /* only delete object if mtime is less than or equal to params.unmod_since */ store->cls_obj_check_mtime(op, params.unmod_since, params.high_precision_time, CLS_RGW_CHECK_TIME_MTIME_LE); } - uint64_t obj_size = state->size; + uint64_t obj_accounted_size = state->accounted_size; if (!real_clock::is_zero(params.expiration_time)) { bufferlist bl; @@ -8938,7 +8938,7 @@ int RGWRados::Object::Delete::delete_obj() return r; /* update quota cache */ - store->quota_handler->update_stats(params.bucket_owner, obj.bucket, -1, 0, obj_size); + store->quota_handler->update_stats(params.bucket_owner, obj.bucket, -1, 0, obj_accounted_size); return 0; }