From eb1331a07985b69a5fadebe04a93b3cddf59ab5f Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sun, 11 Jun 2023 01:32:48 +0300 Subject: [PATCH] Add more details to "journal entry data is corrupt" messages --- src/blockstore_init.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/blockstore_init.cpp b/src/blockstore_init.cpp index 6680210c..3a3f992f 100644 --- a/src/blockstore_init.cpp +++ b/src/blockstore_init.cpp @@ -822,7 +822,13 @@ int blockstore_init_journal::handle_journal_part(void *buf, uint64_t done_pos, u data_csum_valid = data_crc32 == je->small_write.crc32_data; if (!data_csum_valid) { - printf("Journal entry data is corrupt (data crc32 %x != %x)\n", data_crc32, je->small_write.crc32_data); + printf( + "Journal entry data is corrupt for small_write%s oid=%lx:%lx ver=%lu offset=%u len=%u - data crc32 %x != %x\n", + je->type == JE_SMALL_WRITE_INSTANT ? "_instant" : "", + je->small_write.oid.inode, je->small_write.oid.stripe, je->small_write.version, + je->small_write.offset, je->small_write.len, + data_crc32, je->small_write.crc32_data + ); } } else if (je->small_write.len > 0) @@ -861,8 +867,13 @@ int blockstore_init_journal::handle_journal_part(void *buf, uint64_t done_pos, u } if (block_crc32 != *block_csums) { - printf("Journal entry data is corrupt (block %u crc32 %x != %x)\n", - pos, block_crc32, *block_csums); + printf( + "Journal entry data is corrupt for small_write%s oid=%lx:%lx ver=%lu offset=%u len=%u - block %u crc32 %x != %x\n", + je->type == JE_SMALL_WRITE_INSTANT ? "_instant" : "", + je->small_write.oid.inode, je->small_write.oid.stripe, je->small_write.version, + je->small_write.offset, je->small_write.len, + pos, block_crc32, *block_csums + ); data_csum_valid = false; break; }