From: Haomai Wang Date: Mon, 4 Jan 2016 14:17:08 +0000 (+0800) Subject: NVMEDevice: fix compile error X-Git-Tag: v10.0.4~81^2~48 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3a604066e460a5a3b8414fb16e75e32a2294a168;p=ceph.git NVMEDevice: fix compile error Signed-off-by: Haomai Wang --- diff --git a/src/os/bluestore/BlockDevice.h b/src/os/bluestore/BlockDevice.h index c5ebe3494388..59fbbfb8c423 100644 --- a/src/os/bluestore/BlockDevice.h +++ b/src/os/bluestore/BlockDevice.h @@ -52,10 +52,12 @@ struct IOContext { class BlockDevice { public: + typedef void (*aio_callback_t)(void *handle, void *aio); + static BlockDevice *create(CephContext *cct, const string& type, aio_callback_t cb, void *cbpriv); - virtual aio_submit(IOContext *ioc) = 0; + virtual void aio_submit(IOContext *ioc) = 0; virtual uint64_t get_size() const = 0; virtual uint64_t get_block_size() const = 0; diff --git a/src/os/bluestore/KernelDevice.h b/src/os/bluestore/KernelDevice.h index a04c701c0a2d..3d25826d1a17 100644 --- a/src/os/bluestore/KernelDevice.h +++ b/src/os/bluestore/KernelDevice.h @@ -21,10 +21,6 @@ #include "BlockDevice.h" class KernelDevice : public BlockDevice { -public: - typedef void (*aio_callback_t)(void *handle, void *aio); - -private: int fd_direct, fd_buffered; uint64_t size; uint64_t block_size; diff --git a/src/os/bluestore/NVMEDevice.cc b/src/os/bluestore/NVMEDevice.cc index 7c70d6ef0728..69ed36f95223 100644 --- a/src/os/bluestore/NVMEDevice.cc +++ b/src/os/bluestore/NVMEDevice.cc @@ -232,7 +232,7 @@ void NVMEDevice::close() int NVMEDevice::flush() { dout(10) << __func__ << " start" << dendl; - return r; + return 0; } int NVMEDevice::_aio_start() @@ -345,5 +345,5 @@ int NVMEDevice::read(uint64_t off, uint64_t len, bufferlist *pbl, int NVMEDevice::invalidate_cache(uint64_t off, uint64_t len) { dout(5) << __func__ << " " << off << "~" << len << dendl; - return r; + return 0; } diff --git a/src/os/bluestore/NVMEDevice.h b/src/os/bluestore/NVMEDevice.h index da6bcb2a8a8b..1d529bb0645c 100644 --- a/src/os/bluestore/NVMEDevice.h +++ b/src/os/bluestore/NVMEDevice.h @@ -22,9 +22,6 @@ #include "BlockDevice.h" class NVMEDevice : public BlockDevice { - typedef void (*aio_callback_t)(void *handle, void *aio); - - private: /** * points to pinned, physically contiguous memory region; * contains 4KB IDENTIFY structure for controller which is