mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 13:50:09 -05:00
Ensures to test also the progress update.
This commit is contained in:
parent
61ce847d6a
commit
7054256c62
4 changed files with 16 additions and 3 deletions
|
|
@ -4329,7 +4329,9 @@ int state_progress(struct snapraid_state* state, block_off_t blockpos, block_off
|
|||
pred -= PROGRESS_MAX;
|
||||
|
||||
/* if the previous measure is different */
|
||||
if (state->progress_tick == 0 || state->progress_time[pred] != now) {
|
||||
if (state->progress_tick == 0
|
||||
|| state->progress_time[pred] != now
|
||||
) {
|
||||
uint64_t tick_total;
|
||||
uint64_t tick_cpu;
|
||||
unsigned out_perc = 0;
|
||||
|
|
@ -4345,7 +4347,10 @@ int state_progress(struct snapraid_state* state, block_off_t blockpos, block_off
|
|||
out_perc = countpos * 100 / countmax;
|
||||
|
||||
/* if we have at least 5 measures */
|
||||
if (state->progress_tick >= 5) {
|
||||
if (state->progress_tick >= 5
|
||||
/* or if we are running in test mode, with at least one measure */
|
||||
|| (state->opt.force_progress && state->progress_tick >= 1)
|
||||
) {
|
||||
int oldest;
|
||||
int past;
|
||||
time_t delta_time;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue