Add verify_dump option to control whether to dump bad/good blocks or not
authorJens Axboe <jaxboe@fusionio.com>
Wed, 12 Jan 2011 08:03:23 +0000 (09:03 +0100)
committerJens Axboe <jaxboe@fusionio.com>
Wed, 12 Jan 2011 08:03:23 +0000 (09:03 +0100)
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
HOWTO
fio.1
fio.h
options.c

diff --git a/HOWTO b/HOWTO
index 1915bd696feecf56f1cbbcda46ce3569e98980e0..68e17e9f4743b6738fe10c1e329be9783f8af746 100644 (file)
--- 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.
 
                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,
 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 4445c71ff975f7bba1d58854f28f047803ae3680..d372727b69e7311d095ced198c2855f66091ec3d 100644 (file)
--- 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
 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
 .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 95988584c037bfec4d1da5a2170cc8c295611205..05aec80d06ade7e1d58f5cdb090da284e19140cf 100644 (file)
--- 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;
        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;
        unsigned int verify_async;
        unsigned long long verify_backlog;
        unsigned int verify_batch;
index ae5bcc5bca06f409132b474e11555dce5c0f8c1f..37e68d264d928bebdf7ae6b804f14b15549da3cb 100644 (file)
--- 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",
        },
                .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,
        {
                .name   = "verify_async",
                .type   = FIO_OPT_INT,