From c2c92b16ac4bc0afb4302eca3b1723d273f509c3 Mon Sep 17 00:00:00 2001 From: Dongsheng Yang Date: Thu, 14 Apr 2016 18:37:48 +0800 Subject: [PATCH] bluestore: change the return type of _txc_finalize to void Signed-off-by: Dongsheng Yang --- src/os/bluestore/BlueStore.cc | 8 ++------ src/os/bluestore/BlueStore.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index ccf5ad91d925d..08641316c6f65 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -3720,7 +3720,7 @@ void BlueStore::_txc_finish_io(TransContext *txc) p->state == TransContext::STATE_IO_DONE); } -int BlueStore::_txc_finalize(OpSequencer *osr, TransContext *txc) +void BlueStore::_txc_finalize(OpSequencer *osr, TransContext *txc) { dout(20) << __func__ << " osr " << osr << " txc " << txc << " onodes " << txc->onodes << dendl; @@ -3764,8 +3764,6 @@ int BlueStore::_txc_finalize(OpSequencer *osr, TransContext *txc) get_wal_key(txc->wal_txn->seq, &key); txc->t->set(PREFIX_WAL, key, bl); } - - return 0; } void BlueStore::_txc_finish_kv(TransContext *txc) @@ -4262,7 +4260,6 @@ int BlueStore::queue_transactions( Context *onreadable_sync; ObjectStore::Transaction::collect_contexts( tls, &onreadable, &ondisk, &onreadable_sync); - int r; // set up the sequencer OpSequencer *osr; @@ -4290,8 +4287,7 @@ int BlueStore::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); diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 91aec621603bc..ba0fa06a4f7fa 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -609,7 +609,7 @@ private: uint64_t offset, uint64_t length, bool shared); 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_aio_submit(TransContext *txc); void _txc_update_fm(TransContext *txc); -- 2.39.5