Verify offset should swap verification header within the verify interval.
If this is not the case return error. Update the doc. accordingly.
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
.. option:: verify_offset=int
Swap the verification header with data somewhere else in the block before
- writing. It is swapped back before verifying.
+ writing. It is swapped back before verifying. This should be within the
+ range of :option:`verify_interval`.
.. option:: verify_interval=int
.TP
.BI verify_offset \fR=\fPint
Swap the verification header with data somewhere else in the block before
-writing. It is swapped back before verifying.
+writing. It is swapped back before verifying. This should be within the range
+of \fBverify_interval\fR.
.TP
.BI verify_interval \fR=\fPint
Write the verification header at a finer granularity than the
o->verify_write_sequence = 0;
}
+ /*
+ * Verify header should not be offset beyond the verify
+ * interval.
+ */
+ if (o->verify_offset + sizeof(struct verify_header) >
+ o->verify_interval) {
+ log_err("fio: cannot offset verify header beyond the "
+ "verify interval.\n");
+ ret |= 1;
+ }
+
/*
* Disable rand_seed check when we have verify_backlog,
* zone reset frequency for zonemode=zbd, or norandommap.