Extend io_init() to support arbitrary combinations of data and parity operations

This commit is contained in:
Andrea Mazzoleni 2026-05-21 16:59:57 +02:00
parent 185df4bd2e
commit 58fece3584
5 changed files with 122 additions and 46 deletions

View file

@ -683,7 +683,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
buffermax = diskmax + state->level;
/* initialize the io threads */
io_init(&io, state, state->opt.io_cache, buffermax, sync_data_reader, handle, diskmax, 0, sync_parity_writer, parity_handle, state->level);
io_init(&io, state, state->opt.io_cache, buffermax, handle, diskmax, 0, sync_data_reader, 0, parity_handle, state->level, 0, 0, sync_parity_writer);
/* allocate the copy buffer */
copy = malloc_nofail_vector_align(diskmax, diskmax, state->block_size, &copy_alloc);