fio: fix last block never being touched by random offsets
Fix the available range for random offsets which never touched the last block.
Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/io_u.c b/io_u.c
index 77557df..75b23eb 100644
--- a/io_u.c
+++ b/io_u.c
@@ -104,7 +104,7 @@
dprint(FD_RANDOM, "off rand %llu\n", (unsigned long long) r);
- *b = (lastb - 1) * (r / ((uint64_t) rmax + 1.0));
+ *b = lastb * (r / ((uint64_t) rmax + 1.0));
} else {
uint64_t off = 0;