Compare commits

..

2 Commits

Author SHA1 Message Date
Vitaliy Filippov e15b6e7805 Fix "cannot be narrowed" in clang
Test / test_snapshot_ec (push) Successful in 44s Details
Test / test_interrupted_rebalance_ec_imm (push) Successful in 2m10s Details
Test / test_rm (push) Successful in 16s Details
Test / test_move_reappear (push) Failing after 51s Details
Test / test_snapshot_down (push) Successful in 22s Details
Test / test_snapshot_down_ec (push) Successful in 24s Details
Test / test_splitbrain (push) Successful in 23s Details
Test / test_snapshot_chain (push) Successful in 2m32s Details
Test / test_snapshot_chain_ec (push) Successful in 3m2s Details
Test / test_rebalance_verify_imm (push) Successful in 3m0s Details
Test / test_write (push) Successful in 33s Details
Test / test_rebalance_verify (push) Successful in 3m53s Details
Test / test_write_no_same (push) Successful in 12s Details
Test / test_rebalance_verify_ec_imm (push) Successful in 3m23s Details
Test / test_rebalance_verify_ec (push) Successful in 4m11s Details
Test / test_write_xor (push) Failing after 3m12s Details
Test / test_heal_pg_size_2 (push) Successful in 3m47s Details
Test / test_heal_csum_32k_dmj (push) Successful in 5m17s Details
Test / test_heal_ec (push) Successful in 5m34s Details
Test / test_heal_csum_32k_dj (push) Successful in 6m43s Details
Test / test_heal_csum_32k (push) Successful in 6m30s Details
Test / test_scrub (push) Successful in 1m18s Details
Test / test_scrub_zero_osd_2 (push) Successful in 1m11s Details
Test / test_heal_csum_4k_dmj (push) Successful in 6m24s Details
Test / test_heal_csum_4k_dj (push) Successful in 6m23s Details
Test / test_scrub_xor (push) Successful in 54s Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Successful in 1m1s Details
Test / test_scrub_ec (push) Successful in 54s Details
Test / test_scrub_pg_size_3 (push) Successful in 1m25s Details
Test / test_heal_csum_4k (push) Successful in 6m10s Details
2023-11-04 18:14:44 +03:00
Vitaliy Filippov 31017d8412 Allow to start with V2 journal with header size from V1, as incorrectly updated by previous versions 2023-11-04 18:13:42 +03:00
2 changed files with 4 additions and 3 deletions

View File

@ -1372,7 +1372,7 @@ bool journal_flusher_co::trim_journal(int wait_base)
? (uint32_t)JE_START_V1_SIZE : (uint32_t)JE_START_V2_SIZE),
.reserved = 0,
.journal_start = new_trim_pos,
.version = (!bs->dsk.data_csum_type && ((journal_entry_start*)flusher->journal_superblock)->version == JOURNAL_VERSION_V1
.version = (uint64_t)(!bs->dsk.data_csum_type && ((journal_entry_start*)flusher->journal_superblock)->version == JOURNAL_VERSION_V1
? JOURNAL_VERSION_V1 : JOURNAL_VERSION_V2),
.data_csum_type = bs->dsk.data_csum_type,
.csum_block_size = bs->dsk.csum_block_size,

View File

@ -553,7 +553,7 @@ resume_1:
}
if (je_start->size == JE_START_V0_SIZE ||
(je_start->version != JOURNAL_VERSION_V1 || je_start->size != JE_START_V1_SIZE) &&
(je_start->version != JOURNAL_VERSION_V2 || je_start->size != JE_START_V2_SIZE))
(je_start->version != JOURNAL_VERSION_V2 || je_start->size != JE_START_V2_SIZE && je_start->size != JE_START_V1_SIZE))
{
fprintf(
stderr, "The code only supports journal versions 2 and 1, but it is %lu on disk."
@ -562,7 +562,8 @@ resume_1:
);
exit(1);
}
if (je_start->version == JOURNAL_VERSION_V1)
if (je_start->version == JOURNAL_VERSION_V1 ||
je_start->version == JOURNAL_VERSION_V2 && je_start->size == JE_START_V1_SIZE)
{
je_start->data_csum_type = 0;
je_start->csum_block_size = 0;