mirror of
https://github.com/ceph/ceph
synced 2025-02-19 08:57:27 +00:00
rgw: set multipart copy source object as atomic, prefetch
Object's head should only be read once. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
parent
66fbe93847
commit
3e34380553
@ -2491,6 +2491,11 @@ int RGWPutObj::verify_permission()
|
||||
rgw_bucket cs_bucket(copy_source_bucket_info.bucket);
|
||||
rgw_obj_key cs_object(copy_source_object_name, copy_source_version_id);
|
||||
|
||||
rgw_obj obj(cs_bucket, cs_object.name);
|
||||
obj.set_instance(cs_object.instance);
|
||||
store->set_atomic(s->obj_ctx, obj);
|
||||
store->set_prefetch_data(s->obj_ctx, obj);
|
||||
|
||||
/* check source object permissions */
|
||||
if (read_policy(store, s, copy_source_bucket_info, cs_attrs, &cs_policy, cs_bucket, cs_object) < 0) {
|
||||
return -EACCES;
|
||||
|
Loading…
Reference in New Issue
Block a user