Fix submitting forced fsyncs in flusher

This commit is contained in:
Vitaliy Filippov
2025-12-02 01:52:12 +03:00
parent 0f4837e9bb
commit c8f5b6cb19
6 changed files with 23 additions and 18 deletions
+3 -4
View File
@@ -36,6 +36,7 @@ void blockstore_impl_t::prepare_meta_block_write(uint32_t modified_block)
io_uring_prep_writev(
sqe, dsk.meta_fd, &data->iov, 1, dsk.meta_offset + (modified_block+1)*dsk.meta_block_size
);
unsynced_meta_write_count++;
pending_modified_blocks.push_back(modified_block);
modified_blocks[modified_block] = { .sent = false, .buf = buf };
}
@@ -421,10 +422,8 @@ resume_8:
PRIV(op)->write_type == BS_HEAP_BIG_INTENT ||
PRIV(op)->write_type == BS_HEAP_INTENT_WRITE)
unsynced_data_write_count++;
else if (PRIV(op)->write_type == BS_HEAP_DELETE)
unsynced_meta_write_count++;
else
unsynced_small_write_count++;
else if (PRIV(op)->write_type != BS_HEAP_DELETE)
unsynced_buffer_write_count++;
write_iodepth--;
FINISH_OP(op);
return 2;