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