mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 15:06:34 -05:00
Persist content state after parity handles are closed in scrub
This commit is contained in:
parent
930f0dbbcb
commit
719bc5a3d5
1 changed files with 4 additions and 4 deletions
|
|
@ -958,10 +958,6 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
end:
|
||||
state_progress_end(state, countpos, countmax, countsize, "Nothing to scrub. Use the -p PLAN option to select a different plan, like -p full.\n");
|
||||
|
||||
/* save the new state if required */
|
||||
if (state->need_write || state->opt.force_content_write)
|
||||
state_write(state);
|
||||
|
||||
state_usage_print(state);
|
||||
|
||||
if (soft_error || silent_error || io_error) {
|
||||
|
|
@ -1241,6 +1237,10 @@ int state_scrub(struct snapraid_state* state, int plan100, int olderthan)
|
|||
}
|
||||
}
|
||||
|
||||
/* persist progress and error markings only after all parity handles are closed */
|
||||
if (state->need_write || state->opt.force_content_write)
|
||||
state_write(state);
|
||||
|
||||
if (process_error != 0)
|
||||
return -1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue