]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os: Introduce WITH_KSTORE
authorMatan Breizman <mbreizma@redhat.com>
Wed, 5 Feb 2025 17:35:38 +0000 (17:35 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 11 Mar 2025 12:40:42 +0000 (12:40 +0000)
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 <mbreizma@redhat.com>
src/os/CMakeLists.txt
src/os/ObjectStore.cc

index 71452e542bbcdd52aa6a54a531ad95b308e3d62c..acd98ef55a9b480a5797cd9cf1a3657dbb387a26 100644 (file)
@@ -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)
index 9e25979b71654f7bf83639b6f861e1b2a33a8117..cf8666b79d4d59c422659f5427f228446354353e 100644 (file)
@@ -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> ObjectStore::create(
   return nullptr;
 }
 
-#ifndef WITH_SEASTAR
 std::unique_ptr<ObjectStore> ObjectStore::create(
   CephContext *cct,
   const string& type,
@@ -55,13 +54,15 @@ std::unique_ptr<ObjectStore> 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<KStore>(cct, data);
   }
+  #endif
   return create(cct, type, data);
 }
-#endif
+
 
 int ObjectStore::probe_block_device_fsid(
   CephContext *cct,