From a165909745437dfb3ce00bfda19bed47a410954b Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Mon, 2 Dec 2019 18:16:23 +0300 Subject: [PATCH] FIXME --- blockstore_flush.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blockstore_flush.cpp b/blockstore_flush.cpp index 574350aa..1c63ccfb 100644 --- a/blockstore_flush.cpp +++ b/blockstore_flush.cpp @@ -341,6 +341,9 @@ resume_0: } resume_5: // And metadata writes, but only after data writes complete + // FIXME: Oops. We must sync data before writing metadata. + // Because this will result in more fsyncs we should reduce flushers activity by postponing + // flushes until there is sufficient amount of work to do (for example, at least ~32 operations in the queue). if (!bs->inmemory_meta && meta_new.it->second.state == 0 || wait_count > 0) { // metadata sector is still being read or data is still being written, wait for it