Extend io_init() to support arbitrary combinations of data and parity operations

This commit is contained in:
Andrea Mazzoleni 2026-05-21 16:59:57 +02:00
parent 185df4bd2e
commit 58fece3584
5 changed files with 122 additions and 46 deletions

View file

@ -271,7 +271,7 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
buffermax = diskmax + 2 * state->level;
/* initialize the io threads */
io_init(&io, state, state->opt.io_cache, buffermax, scrub_data_reader, handle, diskmax, scrub_parity_reader, 0, parity_handle, state->level);
io_init(&io, state, state->opt.io_cache, buffermax, handle, diskmax, 0, scrub_data_reader, 0, parity_handle, state->level, 0, scrub_parity_reader, 0);
/* possibly waiting disks */
waiting_mac = diskmax > RAID_PARITY_MAX ? diskmax : RAID_PARITY_MAX;