From bd9b6f6c589758235f48d0f909286e08963750f7 Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Mon, 7 Oct 2019 16:39:20 +0300 Subject: [PATCH] os/bluestore: fix improper setting of STATE_KV_SUBMITTED. Fixes: https://tracker.ceph.com/issues/42209 The issue is Nautilus and earlier releases specific as master already has some changes making the case even worse and then fixing the whole bunch. See https://tracker.ceph.com/issues/42189 Signed-off-by: Igor Fedotov (cherry picked from commit f8ed28a812bd068d07d4fe5013a731100038bf17) --- src/os/bluestore/BlueStore.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 10a86f7996a9e..f93f5df954197 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -8843,9 +8843,9 @@ void BlueStore::_txc_state_proc(TransContext *txc) dout(20) << __func__ << " DEBUG randomly forcing submit via kv thread" << dendl; } else { - txc->state = TransContext::STATE_KV_SUBMITTED; int r = cct->_conf->bluestore_debug_omit_kv_commit ? 0 : db->submit_transaction(txc->t); ceph_assert(r == 0); + txc->state = TransContext::STATE_KV_SUBMITTED; _txc_applied_kv(txc); } } @@ -9443,9 +9443,9 @@ void BlueStore::_kv_sync_thread() txc->log_state_latency(logger, l_bluestore_state_kv_queued_lat); int r = cct->_conf->bluestore_debug_omit_kv_commit ? 0 : db->submit_transaction(txc->t); ceph_assert(r == 0); + txc->state = TransContext::STATE_KV_SUBMITTED; _txc_applied_kv(txc); --txc->osr->kv_committing_serially; - txc->state = TransContext::STATE_KV_SUBMITTED; if (txc->osr->kv_submitted_waiters) { std::lock_guard l(txc->osr->qlock); if (txc->osr->_is_all_kv_submitted()) { -- 2.39.5