Make snapraid_io track started state and defer async I/O after initial thermal control

This commit is contained in:
Andrea Mazzoleni 2026-09-07 10:15:13 +02:00
parent 595461f725
commit 74647cda14
6 changed files with 39 additions and 16 deletions

View file

@ -1026,15 +1026,15 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
msg_progress("Syncing...\n");
/* start all the worker threads */
io_start(&io, blockstart, blockmax, block_enabled);
int alert = state_progress_begin(state, blockstart, blockmax, countmax);
if (alert > 0)
goto end;
if (alert < 0)
goto bail_abort;
/* start all the worker threads */
io_start(&io, blockstart, blockmax, block_enabled);
while (1) {
unsigned failed_count;
int error_on_this_block;