]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BlueStore: Only call once notify_all. 15284/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Thu, 25 May 2017 17:01:40 +0000 (01:01 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Fri, 26 May 2017 10:15:06 +0000 (18:15 +0800)
All txcs of deferred_running have the same osr, so only call once
notify_call.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/os/bluestore/BlueStore.cc

index 72016d2317a9b757fe835bff9290de70756a06f4..087b5c37897ee0b78853096966365dc8e0da1b21 100644 (file)
@@ -8370,9 +8370,9 @@ void BlueStore::_deferred_aio_finish(OpSequencer *osr)
     for (auto& i : b->txcs) {
       TransContext *txc = &i;
       txc->state = TransContext::STATE_DEFERRED_CLEANUP;
-      txc->osr->qcond.notify_all();
       costs += txc->cost;
     }
+    osr->qcond.notify_all();
     throttle_deferred_bytes.put(costs);
     std::lock_guard<std::mutex> l(kv_lock);
     deferred_done_queue.emplace_back(b);