vitastor-disk: Write csum_block_size 0 in JE_START without data checksums #126
Reference in New Issue
Block a user
No description provided.
Delete Branch "koolkhel/vitastor:write-journal-csum-block-size"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
With a manual layout, write-journal takes data_csum_type and csum_block_size from the JSON "start" entry and otherwise keeps the blockstore_disk_t defaults. calc_lengths(), which zeroes csum_block_size when there are no checksums, is not run for a manual layout. So a JSON without a "start" entry produced JE_START with data_csum_type none and csum_block_size 4096, and raw-resize then refused the journal: "journal header has different checksum parameters: none/4096 vs none/0".
Zero csum_block_size when there are no data checksums.
Tested:
write-journalfrom a JSON without a "start" entry and without checksums, thenraw-resizemoving the journal. On master it fails withjournal header has different checksum parameters: none/4096 vs none/0; with the fix it completes and the moved journal dumps the same entries. With--data_csum_type crc32c, or a "start" entry with crc32c/16k, JE_START is unchanged.Contributor Name
Yury Luneff (MIND Software LLC, https://mindsw.io)
CLA