Skip to content

Commit

Permalink
Merge pull request ceph#36775 from tchaikov/wip-spdk
Browse files Browse the repository at this point in the history
spdk: pick up spdk v20.07

Reviewed-by: Neha Ojha <[email protected]>
  • Loading branch information
tchaikov authored Sep 3, 2020
2 parents 4bc6662 + 08e8a17 commit 968df0c
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 15 deletions.
4 changes: 4 additions & 0 deletions PendingReleaseNotes
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
an OSD compaction on start. Setting this option to ``true`` and restarting an OSD
will result in an offline compaction of the OSD prior to booting.

* OSD: the option named ``bdev_nvme_retry_count`` has been removed. Because
in SPDK v20.07, there is no easy access to bdev_nvme options, and this
option is hardly used, so it was removed.

* Now when noscrub and/or nodeep-scrub flags are set globally or per pool,
scheduled scrubs of the type disabled will be aborted. All user initiated
scrubs are NOT interrupted.
Expand Down
5 changes: 2 additions & 3 deletions cmake/modules/BuildDPDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,14 @@ function(do_export_dpdk dpdk_dir)

list(APPEND dpdk_components
bus_pci
cmdline
eal
ethdev
kvargs
mbuf
mempool
mempool_ring
pci
ring)
ring
telemetry)
if(Seastar_DPDK)
list(APPEND dpdk_components
bus_vdev
Expand Down
15 changes: 13 additions & 2 deletions cmake/modules/BuildSPDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,21 @@ macro(build_spdk)
set(spdk_CFLAGS "${spdk_CFLAGS} -Wno-address-of-packed-member")
endif()
include(ExternalProject)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64")
# a safer option than relying on the build host's arch
set(target_arch core2)
else()
# default arch used by SPDK
set(target_arch native)
endif()
ExternalProject_Add(spdk-ext
DEPENDS dpdk-ext
SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/spdk
CONFIGURE_COMMAND ./configure --with-dpdk=${DPDK_DIR} --without-isal --without-vhost
CONFIGURE_COMMAND ./configure
--with-dpdk=${DPDK_DIR}
--without-isal
--without-vhost
--target-arch=${target_arch}
# unset $CFLAGS, otherwise it will interfere with how SPDK sets
# its include directory.
# unset $LDFLAGS, otherwise SPDK will fail to mock some functions.
Expand All @@ -31,7 +42,7 @@ macro(build_spdk)
INSTALL_COMMAND "true")
unset(make_cmd)
ExternalProject_Get_Property(spdk-ext source_dir)
foreach(c nvme log lvol env_dpdk sock util)
foreach(c lvol env_dpdk sock nvmf bdev nvme conf thread trace notify accel event_accel blob vmd event_vmd event_bdev sock_posix event_sock event rpc jsonrpc json util log)
add_library(spdk::${c} STATIC IMPORTED)
add_dependencies(spdk::${c} spdk-ext)
set_target_properties(spdk::${c} PROPERTIES
Expand Down
4 changes: 0 additions & 4 deletions src/blk/spdk/NVMEDevice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,6 @@ int NVMEManager::try_get(const spdk_nvme_transport_id& trid, SharedDriverData **
spdk_env_init(&opts);
spdk_unaffinitize_thread();

spdk_nvme_retry_count = g_ceph_context->_conf->bdev_nvme_retry_count;
if (spdk_nvme_retry_count < 0)
spdk_nvme_retry_count = SPDK_NVME_DEFAULT_RETRY_COUNT;

std::unique_lock l(probe_queue_lock);
while (!stopping) {
if (!probe_queue.empty()) {
Expand Down
1 change: 0 additions & 1 deletion src/common/legacy_config_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,6 @@ OPTION(bdev_debug_aio_log_age, OPT_DOUBLE)
// to the uio_pci_generic driver. The purpose is to prevent the case where
// NVMe driver is loaded while osd is running.
OPTION(bdev_nvme_unbind_from_kernel, OPT_BOOL)
OPTION(bdev_nvme_retry_count, OPT_INT) // -1 means by default which is 4
OPTION(bdev_enable_discard, OPT_BOOL)
OPTION(bdev_async_discard, OPT_BOOL)
OPTION(bdev_flock_retry_interval, OPT_FLOAT)
Expand Down
4 changes: 0 additions & 4 deletions src/common/options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3981,10 +3981,6 @@ std::vector<Option> get_global_options() {
.set_default(false)
.set_description(""),

Option("bdev_nvme_retry_count", Option::TYPE_INT, Option::LEVEL_ADVANCED)
.set_default(-1)
.set_description(""),

Option("bdev_enable_discard", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
.set_default(false)
.set_description(""),
Expand Down
2 changes: 1 addition & 1 deletion src/spdk
Submodule spdk updated 1200 files

0 comments on commit 968df0c

Please sign in to comment.