]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix improper setting of STATE_KV_SUBMITTED. 30755/head
authorIgor Fedotov <ifedotov@suse.com>
Mon, 7 Oct 2019 13:39:20 +0000 (16:39 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Tue, 8 Oct 2019 10:04:14 +0000 (13:04 +0300)
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>
src/os/bluestore/BlueStore.cc

index 60baa85da0999b875b07e54a9b62c3695db5d2dc..6c68cbc9541650dfb367a9d5a3650e99738f4f1d 100644 (file)
@@ -9904,9 +9904,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);
        }
       }
@@ -10547,9 +10547,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);
            txc->osr->qcond.notify_all();