]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: shrink aio submit size to pending value 17588/head
authorkungf <yang.wang@easystack.cn>
Fri, 8 Sep 2017 04:09:35 +0000 (12:09 +0800)
committerkungf <yang.wang@easystack.cn>
Fri, 8 Sep 2017 15:54:26 +0000 (23:54 +0800)
Signed-off-by: kungf <yang.wang@easystack.cn>
src/os/bluestore/KernelDevice.cc
src/os/bluestore/aio.cc

index 38bf5d662e9a9259ea1fc3d7b29f6ae4b73ccc35..f04efe69b2a1fd53520b26fe45c021938d7eb72c 100644 (file)
@@ -520,7 +520,7 @@ void KernelDevice::aio_submit(IOContext *ioc)
   void *priv = static_cast<void*>(ioc);
   int r, retries = 0;
   r = aio_queue.submit_batch(ioc->running_aios.begin(), e, 
-                            ioc->num_running.load(), priv, &retries);
+                            pending, priv, &retries);
   
   if (retries)
     derr << __func__ << " retries " << retries << dendl;
index 4996e73452b119a8c9c50085d5c858e71534ece5..66bac89939395a1d5de2a3b80b6ff61ee4b0e0e1 100644 (file)
@@ -46,6 +46,7 @@ int aio_queue_t::submit_batch(aio_iter begin, aio_iter end,
     ++left;
     ++cur;
   }
+  assert(aios_size >= left);
   int done = 0;
   while (left > 0) {
     int r = io_submit(ctx, left, piocb + done);