Reverse the order of disk buffers that are accessed in backward order.

This improves a little the speed.
This commit is contained in:
Andrea Mazzoleni 2013-11-04 19:45:29 +01:00
parent 3dd6e50c4e
commit 6a3438f883
9 changed files with 31 additions and 11 deletions

2
sync.c
View file

@ -74,7 +74,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
/* we need disk + 1 for each parity level buffers */
buffermax = diskmax + state->level;
buffer = malloc_nofail_vector_align(buffermax, state->block_size, &buffer_alloc);
buffer = malloc_nofail_vector_align(diskmax, buffermax, state->block_size, &buffer_alloc);
if (!state->opt.skip_self)
mtest_vector(buffer, buffermax, state->block_size);