Fix disk zone test case
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/io_u.c b/io_u.c
index e0614bd..b636f57 100644
--- a/io_u.c
+++ b/io_u.c
@@ -328,6 +328,15 @@
io_u->ddir = get_rw_ddir(td);
/*
+ * See if it's time to switch to a new zone
+ */
+ if (td->zone_bytes >= td->o.zone_size) {
+ td->zone_bytes = 0;
+ io_u->file->last_pos += td->o.zone_skip;
+ td->io_skip_bytes += td->o.zone_skip;
+ }
+
+ /*
* No log, let the seq/rand engine retrieve the next buflen and
* position.
*/
@@ -660,11 +669,6 @@
assert(io_u->file->flags & FIO_FILE_OPEN);
- if (td->zone_bytes >= td->o.zone_size) {
- td->zone_bytes = 0;
- f->last_pos += td->o.zone_skip;
- }
-
if (io_u->ddir != DDIR_SYNC) {
if (!io_u->buflen) {
put_io_u(td, io_u);