t/nvmept_trim: increase transfer size for some tests
[fio.git] / init.c
diff --git a/init.c b/init.c
index 105339fa28e0b855af65da9cb6a3c30529156e8d..ff3e9a90d551500b3880df95c2505e3a7df9e684 100644 (file)
--- a/init.c
+++ b/init.c
@@ -618,6 +618,19 @@ static int fixup_options(struct thread_data *td)
                ret |= 1;
        }
 
+       if (td_trimwrite(td) && o->num_range > 1) {
+               log_err("fio: trimwrite cannot be used with multiple"
+                       " ranges.\n");
+               ret |= 1;
+       }
+
+       if (td_trim(td) && o->num_range > 1 &&
+           !td_ioengine_flagged(td, FIO_MULTI_RANGE_TRIM)) {
+               log_err("fio: can't use multiple ranges with IO engine %s\n",
+                       td->io_ops->name);
+               ret |= 1;
+       }
+
 #ifndef CONFIG_PSHARED
        if (!o->use_thread) {
                log_info("fio: this platform does not support process shared"
@@ -1002,7 +1015,15 @@ static int fixup_options(struct thread_data *td)
                ret |= 1;
        }
 
-
+       if (td->o.fdp) {
+               if (fio_option_is_set(&td->o, dp_type) &&
+                       (td->o.dp_type == FIO_DP_STREAMS || td->o.dp_type == FIO_DP_NONE)) {
+                       log_err("fio: fdp=1 is not compatible with dataplacement={streams, none}\n");
+                       ret |= 1;
+               } else {
+                       td->o.dp_type = FIO_DP_FDP;
+               }
+       }
        return ret;
 }