In readwrite mode if specified io_size > size, offsets can overlap.
This will result in verify errors. Add check to handle this case.
Fixes:
d782b76f ("Don break too early in readwrite mode")
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
if (td_write(td) && td_random(td) && td->o.norandommap)
total_bytes = max(total_bytes, (uint64_t) td->o.io_size);
- /* Don't break too early if io_size > size */
- if (td_rw(td) && !td_random(td))
+ /*
+ * Don't break too early if io_size > size. The exception is when
+ * verify is enabled.
+ */
+ if (td_rw(td) && !td_random(td) && td->o.verify == VERIFY_NONE)
total_bytes = max(total_bytes, (uint64_t)td->o.io_size);
/*