Fix checksum padding during flush
This commit is contained in:
@@ -661,9 +661,9 @@ bool blockstore_heap_t::calc_block_checksums(uint32_t *block_csums, uint8_t *bit
|
||||
bool isset = false;
|
||||
while (pos < end)
|
||||
{
|
||||
uint32_t prev = pos;
|
||||
if (bitmap)
|
||||
{
|
||||
uint32_t prev = pos;
|
||||
while (pos < end && pos < block_end)
|
||||
{
|
||||
while (pos < end && pos < block_end && !(bitmap[pos/dsk->bitmap_granularity/8] & (1 << ((pos/dsk->bitmap_granularity) % 8))))
|
||||
@@ -696,7 +696,7 @@ bool blockstore_heap_t::calc_block_checksums(uint32_t *block_csums, uint8_t *bit
|
||||
{
|
||||
if (bad_block_cb)
|
||||
{
|
||||
bad_block_cb(block_end, *block_csums, block_crc);
|
||||
bad_block_cb(prev, *block_csums, block_crc);
|
||||
res = false;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user