From ca63cd507dfbc3e5307d0abf7565dd0fb4c2279e Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Thu, 27 Jun 2024 00:38:01 +0300 Subject: [PATCH] Fix possible infinite loop in flusher (surprisingly reproduced in test_write.sh with iothreads) --- src/blockstore/blockstore_flush.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blockstore/blockstore_flush.cpp b/src/blockstore/blockstore_flush.cpp index c70c6760..47e55c67 100644 --- a/src/blockstore/blockstore_flush.cpp +++ b/src/blockstore/blockstore_flush.cpp @@ -366,6 +366,7 @@ resume_0: !flusher->flush_queue.size() || !flusher->dequeuing) { stop_flusher: + flusher->dequeuing = false; if (flusher->trim_wanted > 0 && try_trim) { // Attempt forced trim @@ -373,7 +374,6 @@ stop_flusher: flusher->active_flushers++; goto trim_journal; } - flusher->dequeuing = false; wait_state = 0; return true; }