if(LINUX)
find_package(udev REQUIRED)
set(HAVE_UDEV ${UDEV_FOUND})
-
- find_package(aio REQUIRED)
- set(HAVE_LIBAIO ${AIO_FOUND})
-
find_package(blkid REQUIRED)
set(HAVE_BLKID ${BLKID_FOUND})
else()
set(HAVE_UDEV OFF)
message(STATUS "Not using udev")
- set(HAVE_LIBAIO OFF)
- message(STATUS "Not using AIO")
set(HAVE_BLKID OFF)
message(STATUS "Not using BLKID")
endif(LINUX)
+option(WITH_BLUESTORE "Bluestore OSD backend" ON)
+if(${WITH_BLUESTORE})
+ find_package(aio REQUIRED)
+ set(HAVE_LIBAIO ${AIO_FOUND})
+endif(${WITH_BLUESTORE})
+
option(WITH_OPENLDAP "OPENLDAP is here" ON)
if(${WITH_OPENLDAP})
find_package(OpenLdap REQUIRED)
-D WITH_SYSTEM_BOOST=ON \
-D WITH_LTTNG=OFF \
-D WITH_BLKID=OFF \
+ -D WITH_BLUESTORE=OFF \
-D WITH_FUSE=ON \
-D WITH_KRBD=OFF \
-D WITH_XFS=OFF \
/* ibverbs experimental conditional compilation */
#cmakedefine HAVE_IBV_EXP
+/* define if bluestore enabled */
+#cmakedefine WITH_BLUESTORE
+
/* define if embedded enabled */
#cmakedefine WITH_EMBEDDED
kstore/kstore_types.cc
fs/FS.cc)
-if(HAVE_LIBAIO)
+if(WITH_BLUESTORE)
list(APPEND libos_srcs
bluestore/Allocator.cc
bluestore/BitmapFreelistManager.cc
bluestore/BitAllocator.cc
bluestore/aio.cc
)
-endif(HAVE_LIBAIO)
+endif(WITH_BLUESTORE)
if(WITH_FUSE)
list(APPEND libos_srcs
add_dependencies(os crypto_plugins)
-if(HAVE_LIBAIO)
+if(WITH_BLUESTORE)
add_executable(ceph-bluestore-tool
bluestore/bluestore_tool.cc)
target_link_libraries(ceph-bluestore-tool
#include "filestore/FileStore.h"
#include "memstore/MemStore.h"
-#if defined(HAVE_LIBAIO)
+#if defined(WITH_BLUESTORE)
#include "bluestore/BlueStore.h"
#endif
#include "kstore/KStore.h"
if (type == "memstore") {
return new MemStore(cct, data);
}
-#if defined(HAVE_LIBAIO)
+#if defined(WITH_BLUESTORE)
if (type == "bluestore") {
return new BlueStore(cct, data);
}
{
int r;
-#if defined(HAVE_LIBAIO)
+#if defined(WITH_BLUESTORE)
// first try bluestore -- it has a crc on its header and will fail
// reliably.
r = BlueStore::get_block_device_fsid(cct, path, fsid);
#include "os/filestore/SequencerPosition.h"
TYPE(SequencerPosition)
-#ifdef HAVE_LIBAIO
+#ifdef WITH_BLUESTORE
#include "os/bluestore/bluestore_types.h"
TYPE(bluestore_cnode_t)
TYPE(bluestore_compression_header_t)
add_ceph_unittest(unittest_rocksdb_option)
target_link_libraries(unittest_rocksdb_option global os ${BLKID_LIBRARIES})
-if(HAVE_LIBAIO)
+if(WITH_BLUESTORE)
# unittest_bit_alloc
add_executable(unittest_bit_alloc
BitAllocator_test.cc
)
add_ceph_unittest(unittest_bluestore_types)
target_link_libraries(unittest_bluestore_types os global)
-endif(HAVE_LIBAIO)
+endif(WITH_BLUESTORE)
# unittest_transaction
add_executable(unittest_transaction
#include "os/ObjectStore.h"
#include "os/filestore/FileStore.h"
-#if defined(HAVE_LIBAIO)
+#if defined(WITH_BLUESTORE)
#include "os/bluestore/BlueStore.h"
#endif
#include "include/Context.h"
}
}
-#if defined(HAVE_LIBAIO)
+#if defined(WITH_BLUESTORE)
TEST_P(StoreTestSpecificAUSize, BluestoreStatFSTest) {
if(string(GetParam()) != "bluestore")
return;
ASSERT_EQ(store->stat(cid, hoid2, &st), 0);
}
-#if defined(HAVE_LIBAIO)
+#if defined(WITH_BLUESTORE)
TEST_P(StoreTest, BluestoreOnOffCSumTest) {
if (string(GetParam()) != "bluestore")
return;
::testing::Values(
"memstore",
"filestore",
-#if defined(HAVE_LIBAIO)
+#if defined(WITH_BLUESTORE)
"bluestore",
#endif
"kstore"));
::testing::Values(
"memstore",
"filestore",
-#if defined(HAVE_LIBAIO)
+#if defined(WITH_BLUESTORE)
"bluestore",
#endif
"kstore"));
ASSERT_EQ(res_stat.allocated, max_object);
}
-#if defined(HAVE_LIBAIO)
+#if defined(WITH_BLUESTORE)
void get_mempool_stats(uint64_t* total_bytes, uint64_t* total_items)
{
uint64_t onode_allocated = mempool::bluestore_cache_onode::allocated_bytes();
g_conf->set_val("bluestore_csum_type", "crc32c");
}
-#endif //#if defined(HAVE_LIBAIO)
+#endif //#if defined(WITH_BLUESTORE)
TEST_P(StoreTest, KVDBHistogramTest) {
if (string(GetParam()) != "bluestore")
g_conf->set_val("rocksdb_collect_memory_stats","false");
}
-#if defined(HAVE_LIBAIO)
+#if defined(WITH_BLUESTORE)
TEST_P(StoreTestSpecificAUSize, garbageCollection) {
ObjectStore::Sequencer osr("test");
int r;
#include "common/errno.h"
#include "os/ObjectStore.h"
-#if defined(HAVE_LIBAIO)
+#if defined(WITH_BLUESTORE)
#include "os/bluestore/BlueStore.h"
#endif
#include "store_test_fixture.h"
cerr << __func__ << ": objectstore type " << type << " doesn't exist yet!" << std::endl;
}
ASSERT_TRUE(store);
-#if defined(HAVE_LIBAIO)
+#if defined(WITH_BLUESTORE)
if (type == "bluestore") {
BlueStore *s = static_cast<BlueStore*>(store.get());
// better test coverage!
#include "kv/KeyValueDB.h"
#include "common/url_escape.h"
-#ifdef HAVE_LIBAIO
+#ifdef WITH_BLUESTORE
#include "os/bluestore/BlueStore.h"
#endif
class StoreTool
{
-#ifdef HAVE_LIBAIO
+#ifdef WITH_BLUESTORE
struct Deleter {
BlueStore *bluestore;
Deleter(BlueStore *store = nullptr)
public:
StoreTool(string type, const string &path, bool need_open_db=true) : store_path(path) {
if (type == "bluestore-kv") {
-#ifdef HAVE_LIBAIO
+#ifdef WITH_BLUESTORE
auto bluestore = new BlueStore(g_ceph_context, path, need_open_db);
KeyValueDB *db_ptr;
int r = bluestore->start_kv_only(&db_ptr);