]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix improper setting of STATE_KV_SUBMITTED. 31674/head
authorIgor Fedotov <ifedotov@suse.com>
Mon, 7 Oct 2019 13:39:20 +0000 (16:39 +0300)
committerNathan Cutler <ncutler@suse.com>
Fri, 15 Nov 2019 14:31:28 +0000 (15:31 +0100)
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 <ifedotov@suse.com>
(cherry picked from commit f8ed28a812bd068d07d4fe5013a731100038bf17)

Conflicts:
src/os/bluestore/BlueStore.cc
- luminous assert became ceph_assert later

src/os/bluestore/BlueStore.cc

index 3c7c29f1b7cd9447671c7c2146f429d37af42bfa..414ad62eecd57dba13a9ffa94edf9f426a56c669 100644 (file)
@@ -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<std::mutex> l(txc->osr->qlock);
            if (txc->osr->_is_all_kv_submitted()) {