mirror of
https://github.com/ceph/ceph
synced 2025-02-19 08:57:27 +00:00
os/bluestore: add kv_drain_preceding_waiters indicate drain_preceding.
Condition: (txc->state == TransContext::STATE_PREPARE && deferred_aggressive) isn't correctly for drain_preceding. So represent this event by adding this parameter. Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
This commit is contained in:
parent
3f64cc71f5
commit
ff71ad472e
@ -10263,8 +10263,7 @@ void BlueStore::_txc_finish(TransContext *txc)
|
||||
dout(20) << __func__ << " txc " << txc << " " << txc->get_state_name()
|
||||
<< dendl;
|
||||
if (txc->state != TransContext::STATE_DONE) {
|
||||
if (txc->state == TransContext::STATE_PREPARE &&
|
||||
deferred_aggressive) {
|
||||
if (osr->kv_drain_preceding_waiters && txc->state == TransContext::STATE_PREPARE) {
|
||||
// for _osr_drain_preceding()
|
||||
notify = true;
|
||||
}
|
||||
@ -10385,7 +10384,7 @@ void BlueStore::_osr_drain_preceding(TransContext *txc)
|
||||
{
|
||||
OpSequencer *osr = txc->osr.get();
|
||||
dout(10) << __func__ << " " << txc << " osr " << osr << dendl;
|
||||
++deferred_aggressive; // FIXME: maybe osr-local aggressive flag?
|
||||
osr->kv_drain_preceding_waiters++;
|
||||
{
|
||||
// submit anything pending
|
||||
deferred_lock.lock();
|
||||
@ -10404,7 +10403,7 @@ void BlueStore::_osr_drain_preceding(TransContext *txc)
|
||||
}
|
||||
}
|
||||
osr->drain_preceding(txc);
|
||||
--deferred_aggressive;
|
||||
osr->kv_drain_preceding_waiters--;
|
||||
dout(10) << __func__ << " " << osr << " done" << dendl;
|
||||
}
|
||||
|
||||
|
@ -1613,6 +1613,8 @@ public:
|
||||
|
||||
std::atomic_int kv_submitted_waiters = {0};
|
||||
|
||||
std::atomic_int kv_drain_preceding_waiters = {0};
|
||||
|
||||
std::atomic_bool zombie = {false}; ///< in zombie_osr set (collection going away)
|
||||
|
||||
OpSequencer(BlueStore *store, const coll_t& c)
|
||||
|
Loading…
Reference in New Issue
Block a user