1
0
Fork 0

Fix OSDs incorrectly updating journal superblock after upgrade to 1.x from pre-1.x and refusing to start after it

rdma-simple-nodp
Vitaliy Filippov 2023-11-04 15:02:24 +03:00
parent 1f509cca77
commit 4819854064
1 changed files with 2 additions and 1 deletions

View File

@ -1372,7 +1372,8 @@ 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 = JOURNAL_VERSION_V2,
.version = (!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,
};