Restore the default scrub behaviour of the previous version

If the user like to scrub new blocks, he can now use the -p new
option, and then call again scrub with a percentage to scrub the
old blocks.

Scrubbing old and new blocks are two different operations, and make
sense to keep them separated. Mixing them could instead raise
problematic issues, like not being able to predict the time required
for a full scrub cycle, as it depends also on the amount of synced
data.
This commit is contained in:
Andrea Mazzoleni 2015-11-09 23:21:39 +01:00
parent 9f263b6fa8
commit 1917814d2d
9 changed files with 158 additions and 177 deletions

View file

@ -1038,19 +1038,6 @@ static inline int info_get_justsynced(snapraid_info info)
return (info & 0x4) != 0;
}
/**
* Get the latest scrub time.
*
* If the block was not scrubbed, 0 is returned.
*/
static inline time_t info_get_scrubtime(snapraid_info info)
{
if (info_get_justsynced(info))
return 0;
else
return info_get_time(info);
}
/**
* Mark the block address as with error.
*/