init: loosen serialize_overlap restrictions
authorVincent Fu <vincent.fu@wdc.com>
Thu, 11 Oct 2018 15:32:21 +0000 (11:32 -0400)
committerVincent Fu <vincent.fu@wdc.com>
Mon, 15 Oct 2018 19:42:41 +0000 (15:42 -0400)
When io_submit_mode=offload, allow overlap checking including for jobs
where no data is being changed and when the iodepth is one. These cases
can occur when checking for overlap across different jobs.

init.c

diff --git a/init.c b/init.c
index 1eddc6f..a2b70c4 100644 (file)
--- a/init.c
+++ b/init.c
@@ -744,19 +744,12 @@ static int fixup_options(struct thread_data *td)
        /*
         * There's no need to check for in-flight overlapping IOs if the job
         * isn't changing data or the maximum iodepth is guaranteed to be 1
+        * when we are not in offload mode
         */
        if (o->serialize_overlap && !(td->flags & TD_F_READ_IOLOG) &&
-           (!(td_write(td) || td_trim(td)) || o->iodepth == 1))
+           (!(td_write(td) || td_trim(td)) || o->iodepth == 1) &&
+           o->io_submit_mode != IO_MODE_OFFLOAD)
                o->serialize_overlap = 0;
-       /*
-        * Currently can't check for overlaps in offload mode
-        */
-       if (o->serialize_overlap && o->io_submit_mode == IO_MODE_OFFLOAD) {
-               log_err("fio: checking for in-flight overlaps when the "
-                       "io_submit_mode is offload is not supported\n");
-               o->serialize_overlap = 0;
-               ret |= warnings_fatal;
-       }
 
        if (o->nr_files > td->files_index)
                o->nr_files = td->files_index;