From 9ab0f64bcf74f74838f6066d554f728902c31715 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 29 Sep 2017 13:47:19 -0500 Subject: [PATCH] os/bluestore: wake kv thread when blocking on deferred_bytes We need to wake the kv thread whenever setting deferred_aggressive to ensure that txns with deferred io that have committed but haven't submitted their deferred writes get submitted. This aligns us with the other users of deferred_aggressive (e.g., _osr_drain_all). Signed-off-by: Sage Weil (cherry picked from commit 633b17007701d87903fe1d10b19c44210a3326eb) --- src/os/bluestore/BlueStore.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index e8e3e29b43fae..b46b06ae410a3 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -8865,6 +8865,11 @@ int BlueStore::queue_transactions( << dendl; ++deferred_aggressive; deferred_try_submit(); + { + // wake up any previously finished deferred events + std::lock_guard l(kv_lock); + kv_cond.notify_one(); + } throttle_deferred_bytes.get(txc->cost); --deferred_aggressive; } -- 2.39.5