Only attempt zone switch if we have zones enabled
authorJens Axboe <axboe@kernel.dk>
Sat, 11 Feb 2012 08:04:02 +0000 (09:04 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 11 Feb 2012 08:04:02 +0000 (09:04 +0100)
Just an offset isn't enough.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_u.c

diff --git a/io_u.c b/io_u.c
index d794f011a28332bc96f9e85df16efca920e4f418..161c2cb388d01218628da8468c1fdeba105e40ed 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -668,7 +668,7 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u)
        /*
         * See if it's time to switch to a new zone
         */
-       if (td->zone_bytes >= td->o.zone_size) {
+       if (td->zone_bytes >= td->o.zone_size && td->o.zone_skip) {
                td->zone_bytes = 0;
                io_u->file->file_offset += td->o.zone_range + td->o.zone_skip;
                io_u->file->last_pos = io_u->file->file_offset;