]> git.proxmox.com Git - ceph.git/blob - ceph/src/crimson/os/futurized_store.cc
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / crimson / os / futurized_store.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #include "futurized_store.h"
5 #include "cyanstore/cyan_store.h"
6 #ifdef WITH_BLUESTORE
7 #include "alienstore/alien_store.h"
8 #endif
9 #include "seastore/seastore.h"
10
11 namespace crimson::os {
12
13 std::unique_ptr<FuturizedStore>
14 FuturizedStore::create(const std::string& type,
15 const std::string& data,
16 const ConfigValues& values)
17 {
18 if (type == "cyanstore") {
19 using crimson::os::CyanStore;
20 return std::make_unique<CyanStore>(data);
21 } else if (type == "seastore") {
22 return crimson::os::seastore::make_seastore(
23 data);
24 } else {
25 using crimson::os::AlienStore;
26 #ifdef WITH_BLUESTORE
27 // use AlienStore as a fallback. It adapts e.g. BlueStore.
28 return std::make_unique<AlienStore>(type, data, values);
29 #else
30 ceph_abort_msgf("unsupported objectstore type: %s", type.c_str());
31 return {};
32 #endif
33 }
34 }
35
36 }