]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: wake kv thread when blocking on deferred_bytes
authorSage Weil <sage@redhat.com>
Fri, 29 Sep 2017 18:47:19 +0000 (13:47 -0500)
committerSage Weil <sage@redhat.com>
Thu, 5 Oct 2017 11:58:27 +0000 (06:58 -0500)
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 <sage@redhat.com>
(cherry picked from commit 633b17007701d87903fe1d10b19c44210a3326eb)

src/os/bluestore/BlueStore.cc

index e8e3e29b43fae45334935784fdeaeca9566a264d..b46b06ae410a32c51df2b8eab9536b1d0bbab175 100644 (file)
@@ -8865,6 +8865,11 @@ int BlueStore::queue_transactions(
               << dendl;
       ++deferred_aggressive;
       deferred_try_submit();
+      {
+       // wake up any previously finished deferred events
+       std::lock_guard<std::mutex> l(kv_lock);
+       kv_cond.notify_one();
+      }
       throttle_deferred_bytes.get(txc->cost);
       --deferred_aggressive;
    }