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

View file

@ -486,7 +486,7 @@ static int state_check_process(struct snapraid_state* state, int check, int fix,
/* we need disk + 2 for each parity level buffers + 1 zero buffer */
buffermax = diskmax + state->level * 2 + 1;
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);