From: Ilsoo Byun Date: Wed, 5 Jul 2017 05:42:10 +0000 (-0400) Subject: os/bluestore: fix build errors when spdk is on X-Git-Tag: v12.1.1~186^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F16118%2Fhead;p=ceph.git 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 --- diff --git a/cmake/modules/Finddpdk.cmake b/cmake/modules/Finddpdk.cmake index 6ce9966458d56..343420a8ed7ea 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 9d1a84066720c..2eb278aa0d08c 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 a44b1e1ecc9e0..40378eaec16b3 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 {