From: optimistyzy Date: Mon, 23 Jan 2017 01:56:03 +0000 (+0800) Subject: os/bluestore/NVMEDevice.cc: use aio_wake in both read and read_random X-Git-Tag: v12.0.0~110^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c02e3e5266cfff44601ab8b20d20c786fa72350e;p=ceph.git os/bluestore/NVMEDevice.cc: use aio_wake in both read and read_random There are some issues with random read, it seems that we did not call aio_wake. Signed-off-by: optimistyzy --- diff --git a/src/os/bluestore/NVMEDevice.cc b/src/os/bluestore/NVMEDevice.cc index 3f21b27055c4..e2bbbafcb52e 100644 --- a/src/os/bluestore/NVMEDevice.cc +++ b/src/os/bluestore/NVMEDevice.cc @@ -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 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; }