Skip to content

Commit

Permalink
os/bluestore: wake kv thread when blocking on deferred_bytes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
liewegas committed Oct 4, 2017
1 parent 5a7cc5d commit 633b170
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/os/bluestore/BlueStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8951,6 +8951,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;
}
Expand Down

0 comments on commit 633b170

Please sign in to comment.