Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jewel: RGWRados::get_system_obj() sends unnecessary stat request before read #11867

Merged
merged 1 commit into from Nov 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/rgw/rgw_rados.cc
Expand Up @@ -9057,14 +9057,8 @@ int RGWRados::get_system_obj(RGWObjectCtx& obj_ctx, RGWRados::SystemObject::Read
uint64_t len;
ObjectReadOperation op;

RGWObjState *astate = NULL;

get_obj_bucket_and_oid_loc(obj, bucket, oid, key);

int r = get_system_obj_state(&obj_ctx, obj, &astate, NULL);
if (r < 0)
return r;

if (end < 0)
len = 0;
else
Expand All @@ -9082,7 +9076,7 @@ int RGWRados::get_system_obj(RGWObjectCtx& obj_ctx, RGWRados::SystemObject::Read
}

librados::IoCtx *io_ctx;
r = read_state.get_ioctx(this, obj, &io_ctx);
int r = read_state.get_ioctx(this, obj, &io_ctx);
if (r < 0) {
ldout(cct, 20) << "get_ioctx() on obj=" << obj << " returned " << r << dendl;
return r;
Expand Down