From: Jens Axboe Date: Wed, 12 Jan 2011 08:03:23 +0000 (+0100) Subject: Add verify_dump option to control whether to dump bad/good blocks or not X-Git-Tag: fio-1.50-rc2~2 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=b463e9363b826d5ba4f16e0115a26f24b77078f4 Add verify_dump option to control whether to dump bad/good blocks or not Signed-off-by: Jens Axboe --- diff --git a/HOWTO b/HOWTO index 1915bd69..68e17e9f 100644 --- a/HOWTO +++ b/HOWTO @@ -926,6 +926,11 @@ verify_fatal=bool Normally fio will keep checking the entire contents option is set, fio will exit the job on the first observed failure. +verify_dump=bool If set, dump the contents of both the original data + block and the data block we read off disk to files. This + allows later analysis to inspect just what kind of data + corruption occurred. On by default. + verify_async=int Fio will normally verify IO inline from the submitting thread. This option takes an integer describing how many async offload threads to create for IO verification instead, diff --git a/fio.1 b/fio.1 index 4445c71f..d372727b 100644 --- a/fio.1 +++ b/fio.1 @@ -692,6 +692,11 @@ has to be a hex number that starts with either "0x" or "0X". Use with If true, exit the job on the first observed verification failure. Default: false. .TP +.BI verify_dump \fR=\fPbool +If set, dump the contents of both the original data block and the data block we +read off disk to files. This allows later analysis to inspect just what kind of +data corruption occurred. On by default. +.TP .BI verify_async \fR=\fPint Fio will normally verify IO inline from the submitting thread. This option takes an integer describing how many async offload threads to create for IO diff --git a/fio.h b/fio.h index 95988584..05aec80d 100644 --- a/fio.h +++ b/fio.h @@ -197,6 +197,7 @@ struct thread_options { char verify_pattern[MAX_PATTERN_SIZE]; unsigned int verify_pattern_bytes; unsigned int verify_fatal; + unsigned int verify_dump; unsigned int verify_async; unsigned long long verify_backlog; unsigned int verify_batch; diff --git a/options.c b/options.c index ae5bcc5b..37e68d26 100644 --- a/options.c +++ b/options.c @@ -1466,6 +1466,14 @@ static struct fio_option options[FIO_MAX_OPTS] = { .help = "Exit on a single verify failure, don't continue", .parent = "verify", }, + { + .name = "verify_dump", + .type = FIO_OPT_BOOL, + .off1 = td_var_offset(verify_dump), + .def = "1", + .help = "Dump contents of good and bad blocks on failure", + .parent = "verify", + }, { .name = "verify_async", .type = FIO_OPT_INT,