Fix misleading COPY_BUF_JOURNAL flag on hole slices #78

Merged
vitalif merged 2 commits from changwei.ye/vitastor:fix-misleading-flag into master 2026-08-31 14:22:39 +03:00
3 changed files with 4 additions and 4 deletions

View File

@@ -563,7 +563,7 @@ void journal_flusher_co::fill_partial_checksum_blocks()
}
auto & vec = read_vec[read_vec.size()-1];
read_vec.insert(read_vec.begin()+vec_pos, (copy_buffer_t){
.copy_flags = COPY_BUF_JOURNAL|COPY_BUF_COALESCED,
.copy_flags = COPY_BUF_DATA|COPY_BUF_COALESCED,
.offset = hole_start,
.len = hole_end - hole_start,
.disk_offset = hole_start,

View File

@@ -1006,7 +1006,7 @@ int blockstore_init_journal::handle_journal_part(void *buf, uint64_t done_pos, u
memcpy((uint8_t*)dyn+sizeof(int), dyn_from, dyn_size);
}
bs->dirty_db.emplace(ov, (dirty_entry){
.state = (BS_ST_SMALL_WRITE | BS_ST_SYNCED | (je->type == JE_SMALL_WRITE_INSTANT ? BS_ST_INSTANT : 0)),
.state = (uint32_t)(BS_ST_SMALL_WRITE | BS_ST_SYNCED | (je->type == JE_SMALL_WRITE_INSTANT ? BS_ST_INSTANT : 0)),
.flags = 0,
.location = location,
.offset = je->small_write.offset,
@@ -1090,7 +1090,7 @@ int blockstore_init_journal::handle_journal_part(void *buf, uint64_t done_pos, u
memcpy((uint8_t*)dyn+sizeof(int), dyn_from, dyn_size);
}
auto dirty_it = bs->dirty_db.emplace(ov, (dirty_entry){
.state = (BS_ST_BIG_WRITE | BS_ST_SYNCED | (je->type == JE_BIG_WRITE_INSTANT ? BS_ST_INSTANT : 0)),
.state = (uint32_t)(BS_ST_BIG_WRITE | BS_ST_SYNCED | (je->type == JE_BIG_WRITE_INSTANT ? BS_ST_INSTANT : 0)),
.flags = 0,
.location = je->big_write.location,
.offset = je->big_write.offset,

View File

@@ -527,7 +527,7 @@ out_wakeup:
{
if (result > 0 && cl->read_csum_state && !(cl->recv_flags[i] & RDR_NO_CSUM))
XXH3_64bits_update(cl->read_csum_state, cl->recv_list[i].iov_base, result);
cl->recv_list[i].iov_base += result;
cl->recv_list[i].iov_base = (char*)cl->recv_list[i].iov_base + result;
cl->recv_list[i].iov_len -= result;
}
else