From: Igor Fedotov Date: Mon, 7 Oct 2019 13:39:20 +0000 (+0300) Subject: os/bluestore: fix improper setting of STATE_KV_SUBMITTED. X-Git-Tag: v12.2.13~41^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bf00231cb820c91bfe266f7fcdb515b08063f00b;p=ceph.git 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) Conflicts: src/os/bluestore/BlueStore.cc - luminous assert became ceph_assert later --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 3c7c29f1b7c..414ad62eecd 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -8446,9 +8446,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); assert(r == 0); + txc->state = TransContext::STATE_KV_SUBMITTED; _txc_applied_kv(txc); } } @@ -9076,9 +9076,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); 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()) {