]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/NVMEDevice.cc: use aio_wake in both read and read_random 13055/head
authoroptimistyzy <optimistyzy@gmail.com>
Mon, 23 Jan 2017 01:56:03 +0000 (09:56 +0800)
committeroptimistyzy <optimistyzy@gmail.com>
Tue, 24 Jan 2017 03:35:45 +0000 (11:35 +0800)
There are some issues with random read, it seems that
we did not call aio_wake.

Signed-off-by: optimistyzy <optimistyzy@gmail.com>
src/os/bluestore/NVMEDevice.cc

index 3f21b27055c41fd398e3e969c57d85d0f901a6b0..e2bbbafcb52e767e081b7a4e95ce6c63498728e6 100644 (file)
@@ -935,11 +935,7 @@ int NVMEDevice::read(uint64_t off, uint64_t len, bufferlist *pbl,
   pbl->push_back(std::move(p));
   r = t->return_code;
   delete t;
-  if (ioc->num_waiting.load()) {
-    dout(20) << __func__ << " waking waiter" << dendl;
-    std::unique_lock<std::mutex> l(ioc->lock);
-    ioc->cond.notify_all();
-  }
+  ioc->aio_wake();
   return r;
 }
 
@@ -970,7 +966,7 @@ int NVMEDevice::read_random(uint64_t off, uint64_t len, char *buf, bool buffered
   }
   r = t->return_code;
   delete t;
-
+  ioc.aio_wake();
   return r;
 }