]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: fix assert
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 19 Aug 2016 06:13:05 +0000 (14:13 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 19 Aug 2016 06:13:05 +0000 (14:13 +0800)
This assert is used to guarantee that we don't access violation
but currently has no effect.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueFS.cc

index c5fe0867cb9094cbea60e8f1f41166f8dcfbba0f..eaefe16f74a8030e417e19e8a9ebfef375f7216e 100644 (file)
@@ -1483,9 +1483,10 @@ int BlueFS::_flush_range(FileWriter *h, uint64_t offset, uint64_t length)
     x_off = 0;
   }
   for (unsigned i = 0; i < MAX_BDEV; ++i) {
-    if (bdev[i] && h->iocv[i]->has_aios()) {
+    if (bdev[i]) {
       assert(h->iocv[i]);
-      bdev[i]->aio_submit(h->iocv[i]);
+      if (h->iocv[i]->has_aios())
+        bdev[i]->aio_submit(h->iocv[i]);
     }
   }
   dout(20) << __func__ << " h " << h << " pos now 0x"