: whoami(whoami),
store(store),
throttler(crimson::common::local_conf()),
- obc_registry(crimson::common::local_conf())
+ obc_registry(crimson::common::local_conf()),
+ next_tid(
+ static_cast<ceph_tid_t>(seastar::this_shard_id()) <<
+ (std::numeric_limits<ceph_tid_t>::digits - 8))
{
perf = build_osd_logger(&cct);
cct.get_perfcounters_collection()->add(perf);
return std::make_pair(std::move(op), std::move(fut));
}
+ // tids for ops i issue, prefixed with core id to ensure uniqueness
+ ceph_tid_t next_tid;
+ ceph_tid_t get_tid() {
+ return next_tid++;
+ }
+
+public:
PerShardState(
int whoami,
crimson::os::FuturizedStore &store);
crimson::mgr::Client &mgrc;
- // tids for ops i issue
- unsigned int next_tid{0};
- ceph_tid_t get_tid() {
- return (ceph_tid_t)next_tid++;
- }
-
std::unique_ptr<OSDMeta> meta_coll;
template <typename... Args>
void init_meta_coll(Args&&... args) {
return dispatch_context({}, std::move(ctx));
}
+ /// Return per-core tid
+ ceph_tid_t get_tid() { return local_state.get_tid(); }
+
/// Return core-local pg count * number of cores
unsigned get_num_local_pgs() const {
return local_state.pg_map.get_pg_count();
FORWARD(with_throttle_while, with_throttle_while, local_state.throttler)
FORWARD_TO_OSD_SINGLETON(osdmap_subscribe)
- FORWARD_TO_OSD_SINGLETON(get_tid)
FORWARD_TO_OSD_SINGLETON(queue_want_pg_temp)
FORWARD_TO_OSD_SINGLETON(remove_want_pg_temp)
FORWARD_TO_OSD_SINGLETON(requeue_pg_temp)