X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=init.c;h=164e411c6c8d4a9f576434422dce837edac3a988;hb=8355119b7ef7007b0a251654602584eec000f958;hp=52560ed34ab59a28ad6a1825068f58e75496bea0;hpb=d27f75b8ac13a4056cc8ef09b56de9dd184a2ad1;p=fio.git diff --git a/init.c b/init.c index 52560ed3..164e411c 100644 --- a/init.c +++ b/init.c @@ -698,6 +698,23 @@ static int fixup_options(struct thread_data *td) if (o->iodepth_batch_complete_min > o->iodepth_batch_complete_max) o->iodepth_batch_complete_max = o->iodepth_batch_complete_min; + /* + * 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 + */ + if (o->serialize_overlap && !(td->flags & TD_F_READ_IOLOG) && + (!(td_write(td) || td_trim(td)) || o->iodepth == 1)) + 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; @@ -781,8 +798,8 @@ static int fixup_options(struct thread_data *td) o->unit_base = 8; } -#if !defined(CONFIG_POSIX_FALLOCATE) && !defined(FIO_HAVE_NATIVE_FALLOCATE) - /* Platform doesn't support fallocate so force set it to none */ +#ifndef FIO_HAVE_ANY_FALLOCATE + /* Platform doesn't support any fallocate so force it to none */ o->fallocate_mode = FIO_FALLOCATE_NONE; #endif