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

@ -246,8 +246,9 @@ void state_rehash(struct snapraid_state* state);
*/
#define SCRUB_AUTO -1 /**< Automatic selection. */
#define SCRUB_BAD -2 /**< Scrub only the bad blocks. */
#define SCRUB_SYNC -3 /**< Scub the latest synched data. */
#define SCRUB_NEW -3 /**< Scub the new blocks. */
#define SCRUB_FULL -4 /**< Scrub everything. */
#define SCRUB_EVEN -5 /**< Even blocks. */
/**
* Scrub the files.