]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: update HAVE_PMEM to HAVE_BLUESTORE_PMEM
authorlixiaoy1 <xiaoyan.li@intel.com>
Wed, 10 Jul 2019 15:10:27 +0000 (11:10 -0400)
committerlixiaoy1 <xiaoyan.li@intel.com>
Wed, 10 Jul 2019 15:43:05 +0000 (11:43 -0400)
Signed-off-by: Scott Peterson <scott.d.peterson@intel.com>
Signed-off-by: Xiaoyan Li <xiaoyan.li@intel.com>
CMakeLists.txt
src/include/config-h.in.cmake
src/os/CMakeLists.txt
src/os/bluestore/BlockDevice.cc

index ffdabda7c80e4513a6d20d22fa57cb0e8f0ecdb9..f2041053b97bc4315683a0f2dcdf435cc6bdb7db 100644 (file)
@@ -268,6 +268,14 @@ if(WITH_BLUESTORE)
   endif()
 endif()
 
+include(CMakeDependentOption)
+CMAKE_DEPENDENT_OPTION(WITH_BLUESTORE_PMEM "Enable PMDK libraries" OFF
+  "WITH_BLUESTORE" OFF)
+
+if(WITH_BLUESTORE_PMEM)
+  set(HAVE_BLUESTORE_PMEM ON)
+endif()
+
 if(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64|aarch64")
   option(WITH_SPDK "Enable SPDK" ON)
 else()
@@ -282,19 +290,11 @@ if(WITH_SPDK)
   set(HAVE_SPDK TRUE)
 endif(WITH_SPDK)
 
-option(WITH_PMEM "Enable PMEM" OFF)
-if(WITH_PMEM)
-  set(HAVE_PMEM ON)
-  if(NOT WITH_BLUESTORE)
-    message(SEND_ERROR "Please enable WITH_BLUESTORE for using PMEM")
-  endif()
-endif()
-
 if(WITH_BLUESTORE)
-  if(NOT AIO_FOUND AND NOT HAVE_POSIXAIO AND NOT WITH_SPDK AND NOT WITH_PMEM)
+  if(NOT AIO_FOUND AND NOT HAVE_POSIXAIO AND NOT WITH_SPDK AND NOT WITH_BLUESTORE_PMEM)
     message(SEND_ERROR "WITH_BLUESTORE is ON, "
       "but none of the bluestore backends is enabled. "
-      "Please install libaio, or enable WITH_SPDK or WITH_PMEM (experimental)")
+      "Please install libaio, or enable WITH_SPDK or WITH_BLUESTORE_PMEM (experimental)")
   endif()
 endif()
 
index b1a848d4c10b6259997d3eab8e5bc304f91148e7..777f2e06187c9435a4d73e3520bcf4869c446dcb 100644 (file)
 /* DPDK conditional compilation */
 #cmakedefine HAVE_DPDK
 
-/* PMEM conditional compilation */
-#cmakedefine HAVE_PMEM
+/* PMEM_DEVICE (OSD) conditional compilation */
+#cmakedefine HAVE_BLUESTORE_PMEM
 
 /* Defined if LevelDB supports bloom filters */
 #cmakedefine HAVE_LEVELDB_FILTER_POLICY
index e65d7393f7ae5907898327aa97e5fcef9cab5ed0..2bde97288e5177a8d116de003dc463ea7674ef4b 100644 (file)
@@ -46,10 +46,10 @@ if(WITH_FUSE)
     FuseStore.cc)
 endif(WITH_FUSE)
 
-if(WITH_PMEM)
+if(WITH_BLUESTORE_PMEM)
   list(APPEND libos_srcs
     bluestore/PMEMDevice.cc)
-endif(WITH_PMEM)
+endif()
 
 if(HAVE_LIBXFS)
   list(APPEND libos_srcs
@@ -121,7 +121,7 @@ if(WITH_BLUESTORE)
     DESTINATION bin)
 endif()
 
-if(WITH_PMEM)
+if(WITH_BLUESTORE_PMEM)
   include(ExternalProject)
   ExternalProject_Add(nvml_ext
     DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/src/
@@ -145,7 +145,7 @@ if(WITH_PMEM)
     INTERFACE_LINK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
   target_link_libraries(os pmem)
   target_include_directories(os SYSTEM PRIVATE "${CMAKE_BINARY_DIR}/src/nvml/src/include")
-endif(WITH_PMEM)
+endif(WITH_BLUESTORE_PMEM)
 
 if(WITH_LTTNG AND WITH_EVENTTRACE)
   add_dependencies(os eventtrace_tp)
index bba9a96cd6808994c5c6940adfad2a9a3006b260..ea4170d786c5b283379a2b2427eaa3a8cce5d58a 100644 (file)
@@ -27,7 +27,7 @@
 #include "NVMEDevice.h"
 #endif
 
-#if defined(HAVE_PMEM)
+#if defined(HAVE_BLUESTORE_PMEM)
 #include "PMEMDevice.h"
 #include "libpmem.h"
 #endif
@@ -96,7 +96,7 @@ BlockDevice *BlockDevice::create(CephContext* cct, const string& path,
       type = "ust-nvme";
   }
 
-#if defined(HAVE_PMEM)
+#if defined(HAVE_BLUESTORE_PMEM)
   if (type == "kernel") {
     int is_pmem = 0;
     size_t map_len = 0;
@@ -115,7 +115,7 @@ BlockDevice *BlockDevice::create(CephContext* cct, const string& path,
 
   dout(1) << __func__ << " path " << path << " type " << type << dendl;
 
-#if defined(HAVE_PMEM)
+#if defined(HAVE_BLUESTORE_PMEM)
   if (type == "pmem") {
     return new PMEMDevice(cct, cb, cbpriv);
   }