]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BlueFS: do not wait for IO on flush
authorSage Weil <sage@redhat.com>
Mon, 4 Jan 2016 18:44:32 +0000 (13:44 -0500)
committerSage Weil <sage@redhat.com>
Fri, 8 Jan 2016 18:10:18 +0000 (13:10 -0500)
Wait on fsync and _flush_log only.

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

index 60032ffbe376ab927db3e570954760fb4202313d..d8f56501520570e9d9642029eccee8fb0f387035 100644 (file)
@@ -908,6 +908,7 @@ int BlueFS::_flush_log()
   _flush_bdev();
   int r = _flush(log_writer, true);
   assert(r == 0);
+  _flush_wait(log_writer);
   _flush_bdev();
 
   // clean dirty files
@@ -1031,7 +1032,6 @@ int BlueFS::_flush_range(FileWriter *h, uint64_t offset, uint64_t length)
     }
   }
   dout(20) << __func__ << " h " << h << " pos now " << h->pos << dendl;
-  _flush_wait(h);
   return 0;
 }
 
@@ -1104,6 +1104,7 @@ void BlueFS::_fsync(FileWriter *h)
 {
   dout(10) << __func__ << " " << h << " " << h->file->fnode << dendl;
   _flush(h, true);
+  _flush_wait(h);
   if (h->file->dirty) {
     dout(20) << __func__ << " file metadata is dirty, flushing log on "
             << h->file->fnode << dendl;