From df16ab627a76fed46b48a8095f46f42183fb47d6 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Tue, 17 Mar 2026 22:26:35 +0000 Subject: [PATCH] Fix another bug in old store checksums O_o Checksum verification wasn't working correctly on reads of small initial offsetted writes from the journal (until the write was flushed to "clean" metadata). --- src/blockstore/v1/read.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/blockstore/v1/read.cpp b/src/blockstore/v1/read.cpp index c76c2ef1..b56cf442 100644 --- a/src/blockstore/v1/read.cpp +++ b/src/blockstore/v1/read.cpp @@ -620,8 +620,7 @@ bool blockstore_impl_t::fulfill_clean_read(blockstore_op_t *read_op, uint64_t & else if (from_journal) { // Don't scan bitmap - journal writes don't have holes (internal bitmap)! - uint8_t *csum = !dsk.csum_block_size ? 0 : (clean_entry_bitmap + dsk.clean_entry_bitmap_size + - item_start/dsk.csum_block_size*(dsk.data_csum_type & 0xFF)); + uint8_t *csum = !dsk.csum_block_size ? 0 : (clean_entry_bitmap + dsk.clean_entry_bitmap_size); if (!fulfill_read(read_op, fulfilled, item_start, item_end, (BS_ST_BIG_WRITE | BS_ST_STABLE), 0, clean_loc + item_start, 0, csum, dyn_data)) {