]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: narrow lock scope in _deferred_aio_finish 14491/head
authorSage Weil <sage@redhat.com>
Wed, 19 Apr 2017 14:09:37 +0000 (10:09 -0400)
committerSage Weil <sage@redhat.com>
Wed, 26 Apr 2017 20:58:42 +0000 (16:58 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index 3b5701ef470a81bfd76f35b778d9478a89786381..89244dc6fb6c158262001fbb1d0e1e14e7c51625 100644 (file)
@@ -8290,13 +8290,13 @@ void BlueStore::_deferred_aio_finish(OpSequencer *osr)
   DeferredBatch *b = osr->deferred_running;
   {
     std::lock_guard<std::mutex> l2(osr->qlock);
-    std::lock_guard<std::mutex> l(kv_lock);
     for (auto& i : b->txcs) {
       TransContext *txc = &i;
       txc->state = TransContext::STATE_DEFERRED_CLEANUP;
       txc->osr->qcond.notify_all();
       throttle_deferred_bytes.put(txc->cost);
     }
+    std::lock_guard<std::mutex> l(kv_lock);
     deferred_done_queue.emplace_back(b);
   }