mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-05 06:10:13 -05: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)
|
if (countlimit > count)
|
||||||
countlimit = count;
|
countlimit = count;
|
||||||
|
|
||||||
/* get the time limit */
|
if (countlimit > 0) {
|
||||||
timelimit = info_get_time(infomap[countlimit - 1]);
|
/* get the time limit */
|
||||||
|
timelimit = info_get_time(infomap[countlimit - 1]);
|
||||||
|
|
||||||
/* don't scrub too recent blocks */
|
/* don't scrub too recent blocks */
|
||||||
if (timelimit > recentlimit)
|
if (timelimit > recentlimit)
|
||||||
|
timelimit = recentlimit;
|
||||||
|
} else {
|
||||||
|
/* we don't have a time limit based on quota */
|
||||||
timelimit = recentlimit;
|
timelimit = recentlimit;
|
||||||
|
}
|
||||||
|
|
||||||
/* free the temp vector */
|
/* free the temp vector */
|
||||||
free(infomap);
|
free(infomap);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue