From c6406d67fc669845bc1659507ddd47909fdc9afc Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Tue, 20 Feb 2024 19:40:56 +0300 Subject: [PATCH] Fix journal space_check incorrectly checking for space at the beginning --- src/blockstore_journal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blockstore_journal.cpp b/src/blockstore_journal.cpp index 26a25493..1420eff4 100644 --- a/src/blockstore_journal.cpp +++ b/src/blockstore_journal.cpp @@ -103,7 +103,7 @@ int blockstore_journal_check_t::check_available(blockstore_op_t *op, int entries if (data_after > 0) { next_pos = next_pos + data_after; - if (next_pos > bs->journal.len) + if (next_pos >= bs->journal.len) { if (right_dir) next_pos = bs->journal.block_size + data_after;