mirror of
https://github.com/ceph/ceph
synced 2025-02-23 19:17:37 +00:00
Merge pull request #38234 from inspur-wyq/wip-copy-obj-check-size
rgw : check the object size when copy obj
This commit is contained in:
commit
be54d5f681
@ -5450,6 +5450,10 @@ void RGWCopyObj::execute(optional_yield y)
|
||||
obj_size = astate->size;
|
||||
|
||||
if (!s->system_request) { // no quota enforcement for system requests
|
||||
if (astate->accounted_size > static_cast<size_t>(s->cct->_conf->rgw_max_put_size)) {
|
||||
op_ret = -ERR_TOO_LARGE;
|
||||
return;
|
||||
}
|
||||
// enforce quota against the destination bucket owner
|
||||
op_ret = dest_bucket->check_quota(this, user_quota, bucket_quota,
|
||||
astate->accounted_size, y);
|
||||
|
Loading…
Reference in New Issue
Block a user