mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
rgw: do not pre-fetch data for HEAD requests
Backport: hammer Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
This commit is contained in:
parent
b8699a3bce
commit
e32da3e7c8
@ -448,7 +448,8 @@ int RGWGetObj::verify_permission()
|
||||
{
|
||||
obj = rgw_obj(s->bucket, s->object);
|
||||
store->set_atomic(s->obj_ctx, obj);
|
||||
store->set_prefetch_data(s->obj_ctx, obj);
|
||||
if (get_data)
|
||||
store->set_prefetch_data(s->obj_ctx, obj);
|
||||
|
||||
if (!verify_object_permission(s, RGW_PERM_READ))
|
||||
return -EACCES;
|
||||
|
@ -157,7 +157,7 @@ public:
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
virtual bool prefetch_data() { return true; }
|
||||
virtual bool prefetch_data() { return get_data; }
|
||||
|
||||
void set_get_data(bool get_data) {
|
||||
this->get_data = get_data;
|
||||
|
Loading…
Reference in New Issue
Block a user