Add option to skip content write in sync

This commit is contained in:
Andrea Mazzoleni 2016-05-17 23:17:31 +02:00
parent bec310d50b
commit 4298a238e9
3 changed files with 14 additions and 2 deletions

View file

@ -291,6 +291,7 @@ void config(char* conf, size_t conf_size, const char* argv0)
#define OPT_TEST_IO_ADVISE_DISCARD_32 299
#define OPT_TEST_IO_ADVISE_DIRECT 300
#define OPT_TEST_PARITY_LIMIT 301
#define OPT_TEST_SKIP_CONTENT_WRITE 302
#if HAVE_GETOPT_LONG
struct option long_options[] = {
@ -451,6 +452,9 @@ struct option long_options[] = {
/* Set an artificial parity limit */
{ "test-parity-limit", 1, 0, OPT_TEST_PARITY_LIMIT },
/* Skip content write */
{ "test-skip-content-write", 0, 0, OPT_TEST_SKIP_CONTENT_WRITE },
{ 0, 0, 0, 0 }
};
#endif
@ -874,6 +878,9 @@ int main(int argc, char* argv[])
case OPT_TEST_PARITY_LIMIT :
opt.parity_limit_size = atoll(optarg);
break;
case OPT_TEST_SKIP_CONTENT_WRITE :
opt.skip_content_write = 1;
break;
default :
/* LCOV_EXCL_START */
log_fatal("Unknown option '%c'\n", (char)c);