]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
KStore: change the return type of _txc_finalize to void
authorDongsheng Yang <dongsheng.yang@easystack.cn>
Thu, 14 Apr 2016 10:35:58 +0000 (18:35 +0800)
committerDongsheng Yang <dongsheng.yang@easystack.cn>
Mon, 25 Apr 2016 04:57:53 +0000 (00:57 -0400)
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
src/os/kstore/KStore.cc
src/os/kstore/KStore.h

index 0dba494f48d1fc2159392ce07526525c06203621..5757109f413b07c765a05e517596b7cbd619adb8 100644 (file)
@@ -2219,7 +2219,7 @@ void KStore::_txc_state_proc(TransContext *txc)
   }
 }
 
-int KStore::_txc_finalize(OpSequencer *osr, TransContext *txc)
+void KStore::_txc_finalize(OpSequencer *osr, TransContext *txc)
 {
   dout(20) << __func__ << " osr " << osr << " txc " << txc
           << " onodes " << txc->onodes << dendl;
@@ -2236,8 +2236,6 @@ int KStore::_txc_finalize(OpSequencer *osr, TransContext *txc)
     std::lock_guard<std::mutex> l((*p)->flush_lock);
     (*p)->flush_txns.insert(txc);
   }
-
-  return 0;
 }
 
 void KStore::_txc_finish_kv(TransContext *txc)
@@ -2392,7 +2390,6 @@ int KStore::queue_transactions(
   Context *onreadable_sync;
   ObjectStore::Transaction::collect_contexts(
     tls, &onreadable, &ondisk, &onreadable_sync);
-  int r;
 
   // set up the sequencer
   OpSequencer *osr;
@@ -2420,8 +2417,7 @@ int KStore::queue_transactions(
     _txc_add_transaction(txc, &(*p));
   }
 
-  r = _txc_finalize(osr, txc);
-  assert(r == 0);
+  _txc_finalize(osr, txc);
 
   throttle_ops.get(txc->ops);
   throttle_bytes.get(txc->bytes);
index 09483de46be6d1e75a85644047e065dd467f03ca..ad1300343c4d6fffd959aa746e5f86d2f602ffad 100644 (file)
@@ -366,7 +366,7 @@ private:
   TransContext *_txc_create(OpSequencer *osr);
   void _txc_release(TransContext *txc, uint64_t offset, uint64_t length);
   void _txc_add_transaction(TransContext *txc, Transaction *t);
-  int _txc_finalize(OpSequencer *osr, TransContext *txc);
+  void _txc_finalize(OpSequencer *osr, TransContext *txc);
   void _txc_state_proc(TransContext *txc);
   void _txc_finish_kv(TransContext *txc);
   void _txc_finish(TransContext *txc);