mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-25 17:36:26 -05:00
Automatically fix any scrub date that is in the future
This commit is contained in:
parent
294a0ae90d
commit
f8d86abf4f
3 changed files with 25 additions and 4 deletions
|
|
@ -29,6 +29,10 @@
|
|||
|
||||
unsigned day_ago(time_t ref, time_t now)
|
||||
{
|
||||
/* in case some dates is in the future */
|
||||
if (now < ref)
|
||||
return 0;
|
||||
|
||||
return (now - ref) / (24 * 3600);
|
||||
}
|
||||
|
||||
|
|
@ -458,6 +462,10 @@ int state_status(struct snapraid_state* state)
|
|||
|
||||
printf("\n");
|
||||
|
||||
if (newest > now) {
|
||||
printf("WARNING! You have scrub dates in the future! The next sync/scrub will truncate them!\n");
|
||||
}
|
||||
|
||||
if (unsynced_blocks) {
|
||||
printf("WARNING! The array is NOT fully synced.\n");
|
||||
printf("You have a sync in progress at %u%%.\n", (blockmax - unsynced_blocks) * 100 / blockmax);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue