mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-21 15:36:33 -05:00
Implements an incremental rehash.
This commit is contained in:
parent
2fdcecf350
commit
275ef2ed3c
17 changed files with 473 additions and 338 deletions
|
|
@ -92,6 +92,7 @@ void usage(void)
|
|||
#define OPT_TEST_FORCE_ORDER_ALPHA 269
|
||||
#define OPT_TEST_FORCE_ORDER_DIR 270
|
||||
#define OPT_TEST_FORCE_SCRUB 271
|
||||
#define OPT_TEST_FORCE_SCRUB_EVEN 272
|
||||
|
||||
#if HAVE_GETOPT_LONG
|
||||
struct option long_options[] = {
|
||||
|
|
@ -158,6 +159,9 @@ struct option long_options[] = {
|
|||
/* Force scrub of the specified number of blocks */
|
||||
{ "test-force-scrub", 1, 0, OPT_TEST_FORCE_SCRUB },
|
||||
|
||||
/* Force scrub of all the even blocks. This is really for testing, don't try it. */
|
||||
{ "test-force-scrub-even", 0, 0, OPT_TEST_FORCE_SCRUB_EVEN },
|
||||
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
#endif
|
||||
|
|
@ -358,6 +362,9 @@ int main(int argc, char* argv[])
|
|||
case OPT_TEST_FORCE_SCRUB :
|
||||
opt.force_scrub = atoi(optarg);
|
||||
break;
|
||||
case OPT_TEST_FORCE_SCRUB_EVEN :
|
||||
opt.force_scrub_even = 1;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unknown option '%c'\n", (char)c);
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue