mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-22 16:06:30 -05:00
Extend io_init() to support arbitrary combinations of data and parity operations
This commit is contained in:
parent
185df4bd2e
commit
58fece3584
5 changed files with 122 additions and 46 deletions
|
|
@ -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, ©_alloc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue