Print a new Selecting... stage to get an idea of the time spent on it

This commit is contained in:
Andrea Mazzoleni 2021-05-22 08:46:53 +02:00
parent 4340d436a9
commit cb8b3dc804
4 changed files with 18 additions and 12 deletions

View file

@ -289,6 +289,8 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
silent_error = 0;
io_error = 0;
msg_progress("Selecting...\n");
/* first count the number of blocks to process */
countmax = 0;
plan->countlast = 0;
@ -312,6 +314,8 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
countpos = 0;
plan->countlast = 0;
msg_progress("Scrubbing...\n");
/* start all the worker threads */
io_start(&io, blockstart, blockmax, &block_is_enabled, plan);
@ -874,8 +878,6 @@ int state_scrub(struct snapraid_state* state, int plan, int olderthan)
}
}
msg_progress("Scrubbing...\n");
error = 0;
ret = state_scrub_process(state, parity_handle, 0, blockmax, &ps, now);