From 786bb87d19679538501ad7f56792e09578cd8f66 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 27 Feb 2018 13:20:32 -0500 Subject: [PATCH] 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 --- src/rgw/rgw_rados.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 64a784d8eaf2..89d0ce1b87a7 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; -- 2.47.3