From: Sage Weil Date: Tue, 4 Oct 2016 19:24:31 +0000 (-0400) Subject: os/bluestore/KernelDevice: fix aio_submit race X-Git-Tag: v11.1.0~714^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3ed80d975f41d25f26406dde269aefa76ba9d2fa;p=ceph.git os/bluestore/KernelDevice: fix aio_submit race Behave if pending is empty. Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/KernelDevice.cc b/src/os/bluestore/KernelDevice.cc index 7c6a6eac186a..a24b8b751e99 100644 --- a/src/os/bluestore/KernelDevice.cc +++ b/src/os/bluestore/KernelDevice.cc @@ -329,6 +329,9 @@ void KernelDevice::aio_submit(IOContext *ioc) << " pending " << ioc->num_pending.load() << " running " << ioc->num_running.load() << dendl; + if (ioc->num_pending.load() == 0) { + return; + } // move these aside, and get our end iterator position now, as the // aios might complete as soon as they are submitted and queue more // wal aio's.