Skip to content

Commit

Permalink
os/bluestore: add "_" prefix for internal methods
Browse files Browse the repository at this point in the history
These 4 methods are reserved for internal use only.
Prefix them with "_" to keep pace with others.

Signed-off-by: xie xingguo <[email protected]>
  • Loading branch information
xiexingguo committed Feb 14, 2017
1 parent d4db8e0 commit 7cb210d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions src/os/bluestore/BlueStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7118,7 +7118,7 @@ void BlueStore::_txc_finish_kv(TransContext *txc)
if (!txc->oncommits.empty()) {
finishers[n]->queue(txc->oncommits);
}
op_queue_release_throttle(txc);
_op_queue_release_throttle(txc);
}

void BlueStore::BSPerfTracker::update_from_perfcounters(
Expand Down Expand Up @@ -7157,7 +7157,7 @@ void BlueStore::_txc_finish(TransContext *txc)
txc->removed_collections.pop_front();
}

op_queue_release_wal_throttle(txc);
_op_queue_release_wal_throttle(txc);

OpSequencerRef osr = txc->osr;
{
Expand Down Expand Up @@ -7606,8 +7606,8 @@ int BlueStore::queue_transactions(
if (handle)
handle->suspend_tp_timeout();

op_queue_reserve_throttle(txc);
op_queue_reserve_wal_throttle(txc);
_op_queue_reserve_throttle(txc);
_op_queue_reserve_wal_throttle(txc);

if (handle)
handle->reset_tp_timeout();
Expand All @@ -7621,7 +7621,7 @@ int BlueStore::queue_transactions(
return 0;
}

void BlueStore::op_queue_reserve_throttle(TransContext *txc)
void BlueStore::_op_queue_reserve_throttle(TransContext *txc)
{
throttle_ops.get(txc->ops);
throttle_bytes.get(txc->bytes);
Expand All @@ -7630,7 +7630,7 @@ void BlueStore::op_queue_reserve_throttle(TransContext *txc)
logger->set(l_bluestore_cur_bytes_in_queue, throttle_bytes.get_current());
}

void BlueStore::op_queue_release_throttle(TransContext *txc)
void BlueStore::_op_queue_release_throttle(TransContext *txc)
{
throttle_ops.put(txc->ops);
throttle_bytes.put(txc->bytes);
Expand All @@ -7639,7 +7639,7 @@ void BlueStore::op_queue_release_throttle(TransContext *txc)
logger->set(l_bluestore_cur_bytes_in_queue, throttle_bytes.get_current());
}

void BlueStore::op_queue_reserve_wal_throttle(TransContext *txc)
void BlueStore::_op_queue_reserve_wal_throttle(TransContext *txc)
{
throttle_wal_ops.get(txc->ops);
throttle_wal_bytes.get(txc->bytes);
Expand All @@ -7648,7 +7648,7 @@ void BlueStore::op_queue_reserve_wal_throttle(TransContext *txc)
logger->set(l_bluestore_cur_bytes_in_wal_queue, throttle_wal_bytes.get_current());
}

void BlueStore::op_queue_release_wal_throttle(TransContext *txc)
void BlueStore::_op_queue_release_wal_throttle(TransContext *txc)
{
throttle_wal_ops.put(txc->ops);
throttle_wal_bytes.put(txc->bytes);
Expand Down
8 changes: 4 additions & 4 deletions src/os/bluestore/BlueStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -2311,10 +2311,10 @@ class BlueStore : public ObjectStore,
CollectionRef& d,
unsigned bits, int rem);

void op_queue_reserve_throttle(TransContext *txc);
void op_queue_release_throttle(TransContext *txc);
void op_queue_reserve_wal_throttle(TransContext *txc);
void op_queue_release_wal_throttle(TransContext *txc);
void _op_queue_reserve_throttle(TransContext *txc);
void _op_queue_release_throttle(TransContext *txc);
void _op_queue_reserve_wal_throttle(TransContext *txc);
void _op_queue_release_wal_throttle(TransContext *txc);
};

inline ostream& operator<<(ostream& out, const BlueStore::OpSequencer& s) {
Expand Down

0 comments on commit 7cb210d

Please sign in to comment.