From 554489779080224b9c3d5ecb087f1d68312b9be2 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 4 Jan 2016 13:44:32 -0500 Subject: [PATCH] os/bluestore/BlueFS: do not wait for IO on flush Wait on fsync and _flush_log only. Signed-off-by: Sage Weil --- src/os/bluestore/BlueFS.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 60032ffbe376a..d8f5650152057 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -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; -- 2.39.5