Closed chrfranke closed 1 month ago
Yes hdd_bytes_max = i + ret
is correct, sorry.
I suggested hdd_bytes_max = i
because the HDD_OPT_WR_RND
loop uses hdd_bytes_max = offset
. A closer look shows that the first value of offset
is hdd_bytes
which is larger than the last offset written by the HDD_OPT_WR_SEQ
loop. As consequence, the file written by random writes is larger than the one written by sequential writes. Is this intentional?
Regarding 957f460: The same text should also be removed from the rd-seq
section.
Testcase with current git e8c6318 on Cygwin:
Expected: Nonzero read rate.
Same result occurs with
--hdd-opts rd-seq
or--hdd-opts rd-rnd
. If--hdd-opts wr-rnd
is used, a nonzero read rate is shown.The root of the problem is that the
if (hdd_flags & HDD_OPT_WR_SEQ) { ... }
code section does not sethdd_bytes_max
. This may do the trick:Independent but related:
"By default, written data is not read back." does neither match "The default mode is to stress test sequential writes and reads." nor the source code below comment
/* Must have some read option */
.