mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04:00
Fixes usage of scrub default settings.
This commit is contained in:
parent
486f623b0d
commit
4df7961099
1 changed files with 3 additions and 6 deletions
9
scrub.c
9
scrub.c
|
|
@ -508,17 +508,14 @@ int state_scrub(struct snapraid_state* state, int percentage, int olderthan)
|
|||
/* by default scrub 1/12 of the array */
|
||||
countlimit = md(blockmax, 1, 12);
|
||||
|
||||
if (percentage != -1)
|
||||
countlimit = md(blockmax, percentage, 100);
|
||||
|
||||
/* by default use a 10 day time limit */
|
||||
recentlimit = now - 10 * 24 * 3600;
|
||||
|
||||
if (percentage != -1)
|
||||
countlimit = md(blockmax, percentage, 100);
|
||||
else
|
||||
countlimit = blockmax;
|
||||
if (olderthan != -1)
|
||||
recentlimit = now - olderthan * 24 * 3600;
|
||||
else
|
||||
recentlimit = now;
|
||||
}
|
||||
|
||||
/* identify the time limit */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue