<< ", free 0x" << alloc->get_free()
<< ", fragmentation " << alloc->get_fragmentation()
<< std::dec << dendl;
- if (tracepoint_debug_init_alloc_done) tracepoint_debug_init_alloc_done();
+
return 0;
}
fake_ch = true;
}
OpSequencer *osr = static_cast<OpSequencer*>(ch->osr.get());
- if (tracepoint_debug_deferred_replay_start) tracepoint_debug_deferred_replay_start();
KeyValueDB::Iterator it = db->get_iterator(PREFIX_DEFERRED);
for (it->lower_bound(string()); it->valid(); it->next(), ++count) {
dout(20) << __func__ << " replay " << pretty_binary_string(it->key())
}
bool has_some = _eliminate_outdated_deferred(deferred_txn, bluefs_extents);
if (has_some) {
- if (tracepoint_debug_deferred_replay_track) tracepoint_debug_deferred_replay_track(*deferred_txn);
TransContext *txc = _txc_create(ch.get(), osr, nullptr);
txc->deferred_txn = deferred_txn;
txc->set_state(TransContext::STATE_KV_DONE);
dout(20) << __func__ << " draining osr" << dendl;
_osr_register_zombie(osr);
_osr_drain_all();
- if (tracepoint_debug_deferred_replay_end) tracepoint_debug_deferred_replay_end();
if (fake_ch) {
new_coll_map.clear();
}
void debug_set_prefer_deferred_size(uint64_t s) {
prefer_deferred_size = s;
}
- void set_tracepoint_debug_deferred_replay_start(std::function<void()> action) {
- tracepoint_debug_deferred_replay_start = action;
- }
- void set_tracepoint_debug_deferred_replay_end(std::function<void()> action) {
- tracepoint_debug_deferred_replay_end = action;
- }
- void set_tracepoint_debug_deferred_replay_track(
- std::function<void(const bluestore_deferred_transaction_t&)> action) {
- tracepoint_debug_deferred_replay_track = action;
- }
- void set_tracepoint_debug_init_alloc_done(std::function<void()> action) {
- tracepoint_debug_init_alloc_done = action;
- }
inline void log_latency(const char* name,
int idx,
const ceph::timespan& lat,
int idx2 = l_bluestore_first);
private:
- std::function<void()> tracepoint_debug_deferred_replay_start = nullptr;
- std::function<void()> tracepoint_debug_deferred_replay_end = nullptr;
- std::function<void(const bluestore_deferred_transaction_t&)>
- tracepoint_debug_deferred_replay_track = nullptr;
- std::function<void()> tracepoint_debug_init_alloc_done = nullptr;
bool _debug_data_eio(const ghobject_t& o) {
if (!cct->_conf->bluestore_debug_inject_read_err) {
return false;