From: Casey Bodley Date: Tue, 27 Feb 2018 18:20:32 +0000 (-0500) Subject: rgw: don't hold data_lock over frontend io X-Git-Tag: wip-pdonnell-testing-20180317.202121~164^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=786bb87d19679538501ad7f56792e09578cd8f66;p=ceph-ci.git rgw: don't hold data_lock over frontend io get_obj_data::data_lock protects access to the read_list, which the librados finisher thread appends to on completions locking isn't needed over calls to d->client_cb->handle_data() in get_obj_iterate_cb(), because this callback is called synchronously from the frontend/process_request() thread - no other thread will be submitting io to the d->client_cb callback Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 64a784d8eaf..89d0ce1b87a 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -10663,9 +10663,7 @@ int RGWRados::get_obj_iterate_cb(RGWObjectCtx *ctx, RGWObjState *astate, obj_ofs < astate->data.length()) { unsigned chunk_len = std::min((uint64_t)astate->data.length() - obj_ofs, (uint64_t)len); - d->data_lock.Lock(); r = d->client_cb->handle_data(astate->data, obj_ofs, chunk_len); - d->data_lock.Unlock(); if (r < 0) return r;