]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
NVMEDevice: fix compile error
authorHaomai Wang <haomai@xsky.com>
Mon, 4 Jan 2016 14:17:08 +0000 (22:17 +0800)
committerHaomai Wang <haomai@xsky.com>
Mon, 1 Feb 2016 14:00:42 +0000 (22:00 +0800)
Signed-off-by: Haomai Wang <haomai@xsky.com>
src/os/bluestore/BlockDevice.h
src/os/bluestore/KernelDevice.h
src/os/bluestore/NVMEDevice.cc
src/os/bluestore/NVMEDevice.h

index c5ebe3494388b9ad723392218ac15b33335aba33..59fbbfb8c423fb88ee30bca7871072f0c768734a 100644 (file)
@@ -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;
index a04c701c0a2dac24fffd4dd7162947583ddc8b87..3d25826d1a176c4ac62644ceb7c6b3f1e9026b8f 100644 (file)
 #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;
index 7c70d6ef072807581a9be4301fbd6cb32ef7bd51..69ed36f9522314d393bc855f6e680dc50486cbea 100644 (file)
@@ -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;
 }
index da6bcb2a8a8bad674aada2c886c047ee9db05f24..1d529bb0645caff2e1bea47422468c933e9ae889 100644 (file)
@@ -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