mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Checks for zero count in scrub.
This commit is contained in:
parent
7fa1241b97
commit
adaf87a17d
1 changed files with 9 additions and 4 deletions
13
scrub.c
13
scrub.c
|
|
@ -503,12 +503,17 @@ int state_scrub(struct snapraid_state* state)
|
|||
if (countlimit > count)
|
||||
countlimit = count;
|
||||
|
||||
/* get the time limit */
|
||||
timelimit = info_get_time(infomap[countlimit - 1]);
|
||||
if (countlimit > 0) {
|
||||
/* get the time limit */
|
||||
timelimit = info_get_time(infomap[countlimit - 1]);
|
||||
|
||||
/* don't scrub too recent blocks */
|
||||
if (timelimit > recentlimit)
|
||||
/* don't scrub too recent blocks */
|
||||
if (timelimit > recentlimit)
|
||||
timelimit = recentlimit;
|
||||
} else {
|
||||
/* we don't have a time limit based on quota */
|
||||
timelimit = recentlimit;
|
||||
}
|
||||
|
||||
/* free the temp vector */
|
||||
free(infomap);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue