mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04:00
Print a new Selecting... stage to get an idea of the time spent on it
This commit is contained in:
parent
4340d436a9
commit
cb8b3dc804
4 changed files with 18 additions and 12 deletions
|
|
@ -889,6 +889,8 @@ static int state_check_process(struct snapraid_state* state, int fix, struct sna
|
|||
unrecoverable_error = 0;
|
||||
recovered_error = 0;
|
||||
|
||||
msg_progress("Selecting...\n");
|
||||
|
||||
/* first count the number of blocks to process */
|
||||
countmax = 0;
|
||||
for (i = blockstart; i < blockmax; ++i) {
|
||||
|
|
@ -897,6 +899,13 @@ static int state_check_process(struct snapraid_state* state, int fix, struct sna
|
|||
++countmax;
|
||||
}
|
||||
|
||||
if (fix)
|
||||
msg_progress("Fixing...\n");
|
||||
else if (!state->opt.auditonly)
|
||||
msg_progress("Checking...\n");
|
||||
else
|
||||
msg_progress("Hashing...\n");
|
||||
|
||||
/* check all the blocks in files */
|
||||
countsize = 0;
|
||||
countpos = 0;
|
||||
|
|
@ -2019,13 +2028,6 @@ int state_check(struct snapraid_state* state, int fix, block_off_t blockstart, b
|
|||
parity_ptr[l] = 0;
|
||||
}
|
||||
|
||||
if (fix)
|
||||
msg_progress("Fixing...\n");
|
||||
else if (!state->opt.auditonly)
|
||||
msg_progress("Checking...\n");
|
||||
else
|
||||
msg_progress("Hashing...\n");
|
||||
|
||||
error = 0;
|
||||
|
||||
/* skip degenerated cases of empty parity, or skipping all */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -4117,7 +4117,7 @@ void state_filter(struct snapraid_state* state, tommy_list* filterlist_file, tom
|
|||
if (!filter_missing && !filter_error && tommy_list_empty(filterlist_file) && tommy_list_empty(filterlist_disk))
|
||||
return;
|
||||
|
||||
msg_progress("Filtering...\n");
|
||||
msg_progress("Selecting...\n");
|
||||
|
||||
for (i = tommy_list_head(filterlist_disk); i != 0; i = i->next) {
|
||||
struct snapraid_filter* filter = i->data;
|
||||
|
|
|
|||
|
|
@ -732,6 +732,8 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
silent_error = 0;
|
||||
io_error = 0;
|
||||
|
||||
msg_progress("Selecting...\n");
|
||||
|
||||
/* first count the number of blocks to process */
|
||||
countmax = 0;
|
||||
plan.handle_max = diskmax;
|
||||
|
|
@ -756,6 +758,8 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
countsize = 0;
|
||||
countpos = 0;
|
||||
|
||||
msg_progress("Syncing...\n");
|
||||
|
||||
/* start all the worker threads */
|
||||
io_start(&io, blockstart, blockmax, &block_is_enabled, &plan);
|
||||
|
||||
|
|
@ -1575,8 +1579,6 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
log_fatal("WARNING! Skipped state write for --test-skip-content-write option.\n");
|
||||
}
|
||||
|
||||
msg_progress("Syncing...\n");
|
||||
|
||||
/* skip degenerated cases of empty parity, or skipping all */
|
||||
if (blockstart < blockmax) {
|
||||
ret = state_sync_process(state, parity_handle, blockstart, blockmax);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue