From e42975ffd1b9bc33570012ff10b03ee792b0f383 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Thu, 25 May 2023 00:38:17 +0300 Subject: [PATCH] Fix wait_journal_count not being zeroed --- src/blockstore_flush.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blockstore_flush.cpp b/src/blockstore_flush.cpp index 736ce37b..678179e7 100644 --- a/src/blockstore_flush.cpp +++ b/src/blockstore_flush.cpp @@ -472,7 +472,7 @@ resume_2: return false; // Wait for journal data reads if the journal is not inmemory resume_12: - if (copy_count && !bs->journal.inmemory && wait_journal_count > 0) + if (wait_journal_count > 0) { wait_state = wait_base+12; return false; @@ -1058,7 +1058,7 @@ bool journal_flusher_co::read_dirty(int wait_base) { if (wait_state == wait_base) goto resume_0; else if (wait_state == wait_base+1) goto resume_1; - wait_count = 0; + wait_count = wait_journal_count = 0; if (bs->journal.inmemory && !read_to_fill_incomplete) { // Happy path: nothing to read :)