Revert "ci: stop testing Linux 32-bit builds"
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index 8035f4b725fc13b64be0c11aa5b45853e19a7982..30265cfb4a2da5c19a1c60069d49e2d122a8a620 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -785,7 +785,15 @@ static enum fio_ddir get_rw_ddir(struct thread_data *td)
        else
                ddir = DDIR_INVAL;
 
-       td->rwmix_ddir = rate_ddir(td, ddir);
+       if (!should_check_rate(td)) {
+               /*
+                * avoid time-consuming call to utime_since_now() if rate checking
+                * isn't being used. this imrpoves IOPs 50%. See:
+                * https://github.com/axboe/fio/issues/1501#issuecomment-1418327049
+                */
+               td->rwmix_ddir = ddir;
+       } else
+               td->rwmix_ddir = rate_ddir(td, ddir);
        return td->rwmix_ddir;
 }
 
@@ -976,10 +984,15 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u)
        offset = io_u->offset;
        if (td->o.zone_mode == ZONE_MODE_ZBD) {
                ret = zbd_adjust_block(td, io_u);
-               if (ret == io_u_eof)
+               if (ret == io_u_eof) {
+                       dprint(FD_IO, "zbd_adjust_block() returned io_u_eof\n");
                        return 1;
+               }
        }
 
+       if (td->o.fdp)
+               fdp_fill_dspec_data(td, io_u);
+
        if (io_u->offset + io_u->buflen > io_u->file->real_file_size) {
                dprint(FD_IO, "io_u %p, off=0x%llx + len=0x%llx exceeds file size=0x%llx\n",
                        io_u,
@@ -1357,8 +1370,8 @@ static struct fio_file *__get_next_file(struct thread_data *td)
                if (td->o.file_service_type == FIO_FSERVICE_SEQ)
                        goto out;
                if (td->file_service_left) {
-                 td->file_service_left--;
-                 goto out;
+                       td->file_service_left--;
+                       goto out;
                }
        }
 
@@ -1996,7 +2009,7 @@ static void io_completed(struct thread_data *td, struct io_u **io_u_ptr,
        dprint_io_u(io_u, "complete");
 
        assert(io_u->flags & IO_U_F_FLIGHT);
-       io_u_clear(td, io_u, IO_U_F_FLIGHT | IO_U_F_BUSY_OK);
+       io_u_clear(td, io_u, IO_U_F_FLIGHT | IO_U_F_BUSY_OK | IO_U_F_PATTERN_DONE);
 
        /*
         * Mark IO ok to verify