]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix improper setting of STATE_KV_SUBMITTED. 31673/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:30:11 +0000 (15:30 +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)

src/os/bluestore/BlueStore.cc

index 10a86f7996a9e1f52d180f4eb8da5e3cbce2f2c0..f93f5df9541972faef96b4a34703a8e1bdd17bb5 100644 (file)
@@ -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<std::mutex> l(txc->osr->qlock);
            if (txc->osr->_is_all_kv_submitted()) {