From: Matan Breizman Date: Wed, 5 Feb 2025 17:35:38 +0000 (+0000) Subject: os: Introduce WITH_KSTORE X-Git-Tag: testing/wip-pdonnell-testing-20250324.181635-debug~66^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2b9c79e881de0ce53954999700a5551af9052ee9;p=ceph-ci.git os: Introduce WITH_KSTORE Previosuly, we used WITH_SEASTAR to not include KStore with Crimson. As now Crimson's Alienstore is not defined WITH_SEASTAR We need to be able to not include KStore to alien crimson target as well. Instead, let Classic define PRIVATE WITH_KSTORE that will not be used by the alien targets. This doesn't change anything of non-crimson targets. Signed-off-by: Matan Breizman --- diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt index 71452e542bb..acd98ef55a9 100644 --- a/src/os/CMakeLists.txt +++ b/src/os/CMakeLists.txt @@ -47,6 +47,7 @@ target_link_libraries(os blk ${FMT_LIB}) +target_compile_definitions(os PRIVATE -DWITH_KSTORE) target_link_libraries(os heap_profiler kv) if(WITH_BLUEFS) diff --git a/src/os/ObjectStore.cc b/src/os/ObjectStore.cc index 9e25979b716..cf8666b79d4 100644 --- a/src/os/ObjectStore.cc +++ b/src/os/ObjectStore.cc @@ -21,7 +21,7 @@ #if defined(WITH_BLUESTORE) #include "bluestore/BlueStore.h" #endif -#ifndef WITH_SEASTAR +#ifdef WITH_KSTORE #include "kstore/KStore.h" #endif @@ -43,7 +43,6 @@ std::unique_ptr ObjectStore::create( return nullptr; } -#ifndef WITH_SEASTAR std::unique_ptr ObjectStore::create( CephContext *cct, const string& type, @@ -55,13 +54,15 @@ std::unique_ptr ObjectStore::create( lgeneric_derr(cct) << __func__ << ": FileStore has been deprecated and is no longer supported" << dendl; return nullptr; } + #ifdef WITH_KSTORE if (type == "kstore" && cct->check_experimental_feature_enabled("kstore")) { return std::make_unique(cct, data); } + #endif return create(cct, type, data); } -#endif + int ObjectStore::probe_block_device_fsid( CephContext *cct,