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

@ -514,8 +514,8 @@ int main(int argc, char* argv[])
case 'p' :
if (strcmp(optarg, "bad") == 0) {
percentage = SCRUB_BAD;
} else if (strcmp(optarg, "sync") == 0) {
percentage = SCRUB_SYNC;
} else if (strcmp(optarg, "new") == 0) {
percentage = SCRUB_NEW;
} else if (strcmp(optarg, "full") == 0) {
percentage = SCRUB_FULL;
} else {