Skip to content

Commit 2b9c79e

Browse files
committed
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 <[email protected]>
1 parent b097090 commit 2b9c79e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/os/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ target_link_libraries(os
4747
blk
4848
${FMT_LIB})
4949

50+
target_compile_definitions(os PRIVATE -DWITH_KSTORE)
5051
target_link_libraries(os heap_profiler kv)
5152

5253
if(WITH_BLUEFS)

src/os/ObjectStore.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#if defined(WITH_BLUESTORE)
2222
#include "bluestore/BlueStore.h"
2323
#endif
24-
#ifndef WITH_SEASTAR
24+
#ifdef WITH_KSTORE
2525
#include "kstore/KStore.h"
2626
#endif
2727

@@ -43,7 +43,6 @@ std::unique_ptr<ObjectStore> ObjectStore::create(
4343
return nullptr;
4444
}
4545

46-
#ifndef WITH_SEASTAR
4746
std::unique_ptr<ObjectStore> ObjectStore::create(
4847
CephContext *cct,
4948
const string& type,
@@ -55,13 +54,15 @@ std::unique_ptr<ObjectStore> ObjectStore::create(
5554
lgeneric_derr(cct) << __func__ << ": FileStore has been deprecated and is no longer supported" << dendl;
5655
return nullptr;
5756
}
57+
#ifdef WITH_KSTORE
5858
if (type == "kstore" &&
5959
cct->check_experimental_feature_enabled("kstore")) {
6060
return std::make_unique<KStore>(cct, data);
6161
}
62+
#endif
6263
return create(cct, type, data);
6364
}
64-
#endif
65+
6566

6667
int ObjectStore::probe_block_device_fsid(
6768
CephContext *cct,

0 commit comments

Comments
 (0)