From 4e1294030e173ace29d955a6a94f56976b279d1f Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Mon, 23 May 2016 20:17:53 +0800 Subject: [PATCH] os/bluestore/BlueStore: optimize WALWQ::flush() In fact ThreadPool::drain will do a)wait WorkQueue::empty() is true b)wait processing thread to complete. So it can remove the same work which wait WorkQueue::empty(). Signed-off-by: Jianpeng Ma --- src/os/bluestore/BlueStore.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 2b3bfdc6dbf9f..f43dd18b01c0a 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -749,11 +749,6 @@ public: } void flush() { - lock(); - while (!wal_queue.empty()) { - _wait(); - } - unlock(); drain(); } }; -- 2.39.5