]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: don't hold data_lock over frontend io
authorCasey Bodley <cbodley@redhat.com>
Tue, 27 Feb 2018 18:20:32 +0000 (13:20 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 27 Feb 2018 18:34:17 +0000 (13:34 -0500)
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 <cbodley@redhat.com>
src/rgw/rgw_rados.cc

index 64a784d8eaf2acc2feb206c582c1953d2c8cf74f..89d0ce1b87a7f6f42206b854e0670949df9d10c7 100644 (file)
@@ -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;