Add verify_dump option to control whether to dump bad/good blocks or not
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
diff --git a/HOWTO b/HOWTO
index 1915bd6..68e17e9 100644
--- a/HOWTO
+++ b/HOWTO
@@ -926,6 +926,11 @@
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 4445c71..d372727 100644
--- a/fio.1
+++ b/fio.1
@@ -692,6 +692,11 @@
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 9598858..05aec80 100644
--- a/fio.h
+++ b/fio.h
@@ -197,6 +197,7 @@
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 ae5bcc5..37e68d2 100644
--- a/options.c
+++ b/options.c
@@ -1467,6 +1467,14 @@
.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,
.off1 = td_var_offset(verify_async),