Add the new --test-io-cache option to control the cache size

This commit is contained in:
Andrea Mazzoleni 2016-01-10 19:39:43 +01:00
parent 79cc789e98
commit 7cb33cc046
9 changed files with 59 additions and 26 deletions

View file

@ -695,7 +695,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, buffermax, sync_data_reader, handle, diskmax, 0, sync_parity_writer, parity_handle, state->level);
io_init(&io, state, state->opt.io_cache, buffermax, sync_data_reader, handle, diskmax, 0, sync_parity_writer, parity_handle, state->level);
/* allocate the copy buffer */
copy = malloc_nofail_vector_align(diskmax, diskmax, state->block_size, &copy_alloc);