summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/crimson/os/alienstore/alien_store.cc15
-rw-r--r--src/crimson/os/alienstore/alien_store.h8
-rw-r--r--src/crimson/os/futurized_store.cc5
-rw-r--r--src/crimson/os/futurized_store.h7
-rw-r--r--src/crimson/osd/main.cc3
5 files changed, 10 insertions, 28 deletions
diff --git a/src/crimson/os/alienstore/alien_store.cc b/src/crimson/os/alienstore/alien_store.cc
index dc343b34010..c9dd14501d8 100644
--- a/src/crimson/os/alienstore/alien_store.cc
+++ b/src/crimson/os/alienstore/alien_store.cc
@@ -37,22 +37,20 @@ seastar::logger& logger()
class OnCommit final: public Context
{
- seastar::alien::instance& alien;
const int cpuid;
Context *oncommit;
seastar::promise<> &alien_done;
public:
OnCommit(
- seastar::alien::instance& alien,
int id,
seastar::promise<> &done,
Context *oncommit,
ceph::os::Transaction& txn)
- : alien(alien), cpuid(id), oncommit(oncommit),
+ : cpuid(id), oncommit(oncommit),
alien_done(done) {}
void finish(int) final {
- return seastar::alien::submit_to(alien, cpuid, [this] {
+ return seastar::alien::submit_to(seastar::engine().alien(), cpuid, [this] {
if (oncommit) {
oncommit->complete(0);
}
@@ -69,11 +67,9 @@ using crimson::common::get_conf;
AlienStore::AlienStore(const std::string& type,
const std::string& path,
- const ConfigValues& values,
- seastar::alien::instance& alien)
+ const ConfigValues& values)
: type(type),
- path{path},
- alien{alien}
+ path{path}
{
cct = std::make_unique<CephContext>(CEPH_ENTITY_TYPE_OSD);
g_ceph_context = cct.get();
@@ -430,8 +426,7 @@ seastar::future<> AlienStore::do_transaction(CollectionRef ch,
assert(tp);
return tp->submit(ch->get_cid().hash_to_shard(tp->size()),
[this, ch, id, crimson_wrapper, &txn, &done] {
- txn.register_on_commit(new OnCommit(alien,
- id, done, crimson_wrapper,
+ txn.register_on_commit(new OnCommit(id, done, crimson_wrapper,
txn));
auto c = static_cast<AlienCollection*>(ch.get());
return store->queue_transaction(c->collection, std::move(txn));
diff --git a/src/crimson/os/alienstore/alien_store.h b/src/crimson/os/alienstore/alien_store.h
index aa0b53ace15..5f96d0658e3 100644
--- a/src/crimson/os/alienstore/alien_store.h
+++ b/src/crimson/os/alienstore/alien_store.h
@@ -14,10 +14,6 @@
#include "crimson/os/futurized_collection.h"
#include "crimson/os/futurized_store.h"
-namespace seastar::alien {
-class instance;
-}
-
namespace ceph::os {
class Transaction;
}
@@ -45,8 +41,7 @@ public:
};
AlienStore(const std::string& type,
const std::string& path,
- const ConfigValues& values,
- seastar::alien::instance& alien);
+ const ConfigValues& values);
~AlienStore() final;
seastar::future<> start() final;
@@ -131,7 +126,6 @@ private:
mutable std::unique_ptr<crimson::os::ThreadPool> tp;
const std::string type;
const std::string path;
- seastar::alien::instance& alien;
uint64_t used_bytes = 0;
std::unique_ptr<ObjectStore> store;
std::unique_ptr<CephContext> cct;
diff --git a/src/crimson/os/futurized_store.cc b/src/crimson/os/futurized_store.cc
index 90fb9de36d1..ede82c0ac39 100644
--- a/src/crimson/os/futurized_store.cc
+++ b/src/crimson/os/futurized_store.cc
@@ -8,8 +8,7 @@ namespace crimson::os {
std::unique_ptr<FuturizedStore>
FuturizedStore::create(const std::string& type,
const std::string& data,
- const ConfigValues& values,
- seastar::alien::instance& alien)
+ const ConfigValues& values)
{
if (type == "cyanstore") {
return std::make_unique<crimson::os::CyanStore>(data);
@@ -18,7 +17,7 @@ FuturizedStore::create(const std::string& type,
} else {
// use AlienStore as a fallback. It adapts e.g. BlueStore.
return std::make_unique<crimson::os::AlienStore>(
- type, data, values, alien);
+ type, data, values);
}
}
diff --git a/src/crimson/os/futurized_store.h b/src/crimson/os/futurized_store.h
index 84ab35155e6..435b11067f4 100644
--- a/src/crimson/os/futurized_store.h
+++ b/src/crimson/os/futurized_store.h
@@ -15,10 +15,6 @@
#include "include/uuid.h"
#include "osd/osd_types.h"
-namespace seastar::alien {
-class instance;
-}
-
namespace ceph::os {
class Transaction;
}
@@ -57,8 +53,7 @@ public:
static std::unique_ptr<FuturizedStore> create(const std::string& type,
const std::string& data,
- const ConfigValues& values,
- seastar::alien::instance& alien);
+ const ConfigValues& values);
FuturizedStore() = default;
virtual ~FuturizedStore() = default;
diff --git a/src/crimson/osd/main.cc b/src/crimson/osd/main.cc
index f48056ec9df..799d8d13603 100644
--- a/src/crimson/osd/main.cc
+++ b/src/crimson/osd/main.cc
@@ -307,8 +307,7 @@ int main(int argc, char* argv[])
auto store = crimson::os::FuturizedStore::create(
local_conf().get_val<std::string>("osd_objectstore"),
local_conf().get_val<std::string>("osd_data"),
- local_conf().get_config_values(),
- app.alien());
+ local_conf().get_config_values());
osd.start_single(whoami, nonce,
std::ref(*store),