using core_id_t = seastar::shard_id;
static constexpr core_id_t NULL_CORE = std::numeric_limits<core_id_t>::max();
+static constexpr unsigned int NULL_STORE_INDEX = std::numeric_limits<unsigned int>::max();
+static constexpr uint32_t GLOBAL_STORE = std::numeric_limits<uint32_t>::max();
+static constexpr unsigned int DEFAULT_STORE_INDEX = 0;
/**
* submit_to
{
}
-seastar::future<> AlienStore::start()
+seastar::future<unsigned int> AlienStore::start()
{
cct = std::make_unique<CephContext>(
CEPH_ENTITY_TYPE_OSD,
const auto num_threads =
get_conf<uint64_t>("crimson_bluestore_num_threads");
tp = std::make_unique<crimson::os::ThreadPool>(num_threads, 128, alien_thread_cpu_cores);
- return tp->start();
+ return tp->start().then([]() {
+ return seastar::make_ready_future<unsigned int>(seastar::smp::count);
+ });
}
seastar::future<> AlienStore::stop()
ret.resize(ls.size());
std::transform(
ls.begin(), ls.end(), ret.begin(),
- [](auto p) { return std::make_pair(p, NULL_CORE); });
+ [](auto p) { return std::make_pair(p, std::make_pair(NULL_CORE, NULL_STORE_INDEX)); });
return seastar::make_ready_future<std::vector<coll_core_t>>(std::move(ret));
});
});
const ConfigValues& values);
~AlienStore() final;
- seastar::future<> start() final;
+ seastar::future<unsigned int> start() final;
seastar::future<> stop() final;
mount_ertr::future<> mount() final;
seastar::future<> umount() final;
const ghobject_t& oid,
interval_set<uint64_t>& m,
uint32_t op_flags = 0) final;
-
get_attr_errorator::future<ceph::bufferlist> get_attr(
CollectionRef c,
uint64_t len,
uint32_t op_flags) final;
- FuturizedStore::Shard& get_sharded_store() final {
+ BackendStore get_backend_store(uint32_t store_index = NULL_STORE_INDEX) final {
+ return BackendStore(*this, GLOBAL_STORE, store_index);
+ }
+
+ FuturizedStore::Shard& get_sharded_store(uint32_t store_index) final {
return *this;
}