genfio: Warn users if read occurs before write
The default mode was to generate read pattern _before_ the write ones.
On some storage device that handle read on untouch sectors by answering
zero from the cache, the result is totally invalid and cheat about the
real read capabilities of the device.
This patch does change the default mode to emit writes before reads.
It also add a warning message if user is setting up some modes by itself
and generate a read_before_write pattern.
That's only a warning message that last a few seconds but could avoid
running a wrong benchmark.
This commit occurs after a real case of invalid performances due to read
emitted to an untouched block volume.
Typical output will be:
root@vm1-1: genfio -d vdb -s -b 4k,128k,4m -m read,randread
###############################################################
# Warning : You are reading data while never wrote them before#
# On some storage devices, this could lead to invalid results #
# #
# Press Ctrl-C to adjust pattern order if you have doubts #
# Or Wait 5 seconds before the file will be created #
###############################################################
Generating vm1-1-4k,128k,4m-sequential-read,randread-vdb.fio
Estimated Time = 1800 seconds : 0 hour 30 minutes