- memstore
- kstore
- seastore
+ - cyanstore
flags:
- create
with_legacy: true
#include "common/ceph_context.h"
#include "global/global_context.h"
#include "include/Context.h"
-#include "os/bluestore/BlueStore.h"
-#include "os/memstore/MemStore.h"
#include "os/ObjectStore.h"
#include "os/Transaction.h"
using crimson::common::get_conf;
-AlienStore::AlienStore(const std::string& path,
+AlienStore::AlienStore(const std::string& type,
+ const std::string& path,
const ConfigValues& values,
seastar::alien::instance& alien)
- : path{path},
+ : type(type),
+ path{path},
alien{alien}
{
cct = std::make_unique<CephContext>(CEPH_ENTITY_TYPE_OSD);
seastar::future<> AlienStore::start()
{
- store = std::make_unique<BlueStore>(cct.get(), path);
+ store = ObjectStore::create(cct.get(), type, path);
+ if (!store) {
+ ceph_abort_msgf("unsupported objectstore type: %s", type.c_str());
+ }
std::vector<uint64_t> cpu_cores = _parse_cpu_cores();
// cores except the first "N_CORES_FOR_SEASTAR" ones will
// be used for alien threads scheduling:
AlienStore* store;
CollectionRef ch;
};
- AlienStore(const std::string& path,
+ AlienStore(const std::string& type,
+ const std::string& path,
const ConfigValues& values,
seastar::alien::instance& alien);
~AlienStore() final;
static constexpr int N_CORES_FOR_SEASTAR = 3;
constexpr static unsigned MAX_KEYS_PER_OMAP_GET_CALL = 32;
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;
const ConfigValues& values,
seastar::alien::instance& alien)
{
- if (type == "memstore") {
+ if (type == "cyanstore") {
return std::make_unique<crimson::os::CyanStore>(data);
- } else if (type == "bluestore") {
- return std::make_unique<crimson::os::AlienStore>(data, values, alien);
} else if (type == "seastore") {
return crimson::os::seastore::make_seastore(data, values);
} else {
- ceph_abort_msgf("unsupported objectstore type: %s", type.c_str());
- return {};
+ // use AlienStore as a fallback. It adapts e.g. BlueStore.
+ return std::make_unique<crimson::os::AlienStore>(
+ type, data, values, alien);
}
}
-b, --bluestore use bluestore as the osd objectstore backend (default)
-f, --filestore use filestore as the osd objectstore backend
-K, --kstore use kstore as the osd objectstore backend
+ --cyanstore use cyanstore as the osd objectstore backend
--memstore use memstore as the osd objectstore backend
--cache <pool>: enable cache tiering on pool
--short: short object names only; necessary for ext4 dev