From 7cc59260c5cd504493e44fbe35946a4102bdb4b0 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Mon, 22 Feb 2021 00:07:05 +0300 Subject: [PATCH] Fix no_same_sector_overwrites related bug --- blockstore_journal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockstore_journal.cpp b/blockstore_journal.cpp index 98f6378f..133d4227 100644 --- a/blockstore_journal.cpp +++ b/blockstore_journal.cpp @@ -20,7 +20,7 @@ int blockstore_journal_check_t::check_available(blockstore_op_t *op, int entries int required = entries_required; while (1) { - int fits = bs->journal.no_same_sector_overwrites && bs->journal.sector_info[next_sector].written + int fits = bs->journal.no_same_sector_overwrites && next_pos == bs->journal.next_free && bs->journal.sector_info[next_sector].written ? 0 : (bs->journal.block_size - next_in_pos) / size; if (fits > 0)