Remove the unused number of data disks from the vector allocation

The same addressing rules are applied to the parity disks because
they are used as data disks during recovery operations.
This commit is contained in:
Andrea Mazzoleni 2026-06-02 21:32:21 +02:00
parent eff11e4607
commit 9e19222090
11 changed files with 21 additions and 24 deletions

View file

@ -967,7 +967,7 @@ static int state_check_process(struct snapraid_state* state, int fix, struct sna
/* we need 1 * data + 2 * parity + 1 * zero */
buffermax = diskmax + 2 * state->level + 1;
buffer = malloc_nofail_vector_align(diskmax, buffermax, state->block_size, &buffer_alloc);
buffer = malloc_nofail_vector_align(buffermax, state->block_size, &buffer_alloc);
if (!state->opt.skip_self)
mtest_vector(buffermax, state->block_size, buffer);