From 77c10fd1f8506f466f87ea8da227c469227bf5ab Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 3 Feb 2024 20:37:36 +0300 Subject: [PATCH] In fact, do not autosync blockstore when autosync_writes=0 --- src/blockstore_write.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blockstore_write.cpp b/src/blockstore_write.cpp index 355e4f38..8f314ccf 100644 --- a/src/blockstore_write.cpp +++ b/src/blockstore_write.cpp @@ -129,7 +129,7 @@ bool blockstore_impl_t::enqueue_write(blockstore_op_t *op) } bool imm = (op->len < dsk.data_block_size ? (immediate_commit != IMMEDIATE_NONE) : (immediate_commit == IMMEDIATE_ALL)); if (wait_big && !is_del && !deleted && op->len < dsk.data_block_size && !imm || - !imm && unsynced_queued_ops >= autosync_writes) + !imm && autosync_writes && unsynced_queued_ops >= autosync_writes) { // Issue an additional sync so that the previous big write can reach the journal blockstore_op_t *sync_op = new blockstore_op_t;