]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/KernelDevice: fix aio_submit race
authorSage Weil <sage@redhat.com>
Tue, 4 Oct 2016 19:24:31 +0000 (15:24 -0400)
committerSage Weil <sage@redhat.com>
Tue, 4 Oct 2016 19:28:49 +0000 (15:28 -0400)
Behave if pending is empty.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/KernelDevice.cc

index 7c6a6eac186a6be91abe65d20706ac0249277013..a24b8b751e993c5ae4e9166b33a1bedd652f8b6f 100644 (file)
@@ -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.