From 8134620ad4860add6d059fd006afea57c49747b9 Mon Sep 17 00:00:00 2001 From: Ilsoo Byun Date: Wed, 5 Jul 2017 01:42:10 -0400 Subject: [PATCH] os/bluestore: fix build errors when spdk is on - remove pthread library link from dpdk cmake - fix the bugs of NVMEDevice Signed-off-by: Ilsoo Byun --- cmake/modules/Finddpdk.cmake | 2 +- src/os/bluestore/NVMEDevice.cc | 2 +- src/os/bluestore/NVMEDevice.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/modules/Finddpdk.cmake b/cmake/modules/Finddpdk.cmake index 6ce9966458d..343420a8ed7 100644 --- a/cmake/modules/Finddpdk.cmake +++ b/cmake/modules/Finddpdk.cmake @@ -71,5 +71,5 @@ if (EXISTS ${WITH_DPDK_MLX5}) list(APPEND check_LIBRARIES -libverbs) endif() set(DPDK_LIBRARIES - -Wl,--whole-archive ${check_LIBRARIES} -lpthread -Wl,--no-whole-archive) + -Wl,--whole-archive ${check_LIBRARIES} -Wl,--no-whole-archive) endif(DPDK_FOUND) diff --git a/src/os/bluestore/NVMEDevice.cc b/src/os/bluestore/NVMEDevice.cc index 9d1a8406672..2eb278aa0d0 100644 --- a/src/os/bluestore/NVMEDevice.cc +++ b/src/os/bluestore/NVMEDevice.cc @@ -1028,7 +1028,7 @@ int NVMEDevice::aio_write( int NVMEDevice::write(uint64_t off, bufferlist &bl, bool buffered) { // FIXME: there is presumably a more efficient way to do this... - IOContext ioc(NULL); + IOContext ioc(cct, NULL); aio_write(off, bl, &ioc, buffered); ioc.aio_wait(); return 0; diff --git a/src/os/bluestore/NVMEDevice.h b/src/os/bluestore/NVMEDevice.h index a44b1e1ecc9..40378eaec16 100644 --- a/src/os/bluestore/NVMEDevice.h +++ b/src/os/bluestore/NVMEDevice.h @@ -28,6 +28,7 @@ #include "include/interval_set.h" #include "common/ceph_time.h" #include "common/Mutex.h" +#include "common/Cond.h" #include "BlockDevice.h" enum class IOCommand {